T
TanStack2y ago
ambitious-aqua

Navigation blocking for tests

I am currently trying to build a decorator to allow me to block navigation when within a Storybook story. Tried using both the
<Block />
<Block />
component as well as the
useBlocker()
useBlocker()
hook within a wrapper component that would then render the story, but it seems (from the examples) that the block is only effective within the component which is performing some kind of navigation. Is that the case, or am I missing something?
1 Reply
ambitious-aqua
ambitious-aquaOP2y ago
Isn't there a way to do this?

Did you find this page helpful?