You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what's incorrect/missing in the documentation
Hello 👋
Using useBlocker causes "Error: useBlocker must be used within a data router." error, but there is no DataRouter or useBlocker in docs. How should it be used?
gabberr, semornas, frekvent-balint, acelaya, akoskm and 4 more
On top of that, this table here looks misleading as it has green ticks for all the modes about useBlocker, while (if I got it correctly) that's not true.
Activity
[-][Docs]: useBlocker usage[/-][+][Docs]: `useBlocker` usage[/+]akoskm commentedon Jan 29, 2025
If this error appears inside of a test, make sure you wrap your component with the stub router: https://reactrouter.com/start/framework/testing#testing
einarq commentedon Jan 31, 2025
Probably have to refer to the v6 docs for this:
marcellobarile commentedon Mar 24, 2025
On top of that, this table here looks misleading as it has green ticks for all the modes about
useBlocker
, while (if I got it correctly) that's not true.brookslybrand commentedon Jun 13, 2025
Thanks @flaff for raising this!
We do now have a
useBlocker
doc@einarq I've added some of the context in those docs that were missing in #13803
@marcellobarile the table seems to be corrected now. Thanks for pointing this out though