Loading video...

Video Failed to Load

Go Home

I don't know if SQL is bad or not but losing user data in the middle of a workflow certainly is! Did you know you can block React Router navigations in to prevent losing user data? let blocker = useBlocker(shouldBlock) blocker.state blocker.proceed() blocker.reset()

41,500 views • 1 year ago •via X (Twitter)

10 Comments

Ryan Florence's profile picture
Ryan Florence1 year ago

Navigation Blocking How-To Guide

Brian's profile picture
Brian1 year ago

Is this video on YouTube as well? Videos on X basically undiscoverable, so, would recommend uploading as a “Remix Single” (or whatever the react router equivalent might be called)

Ryan Florence's profile picture
Ryan Florence1 year ago

there's a guide in the docs now, this video took me like 10 more minutes than writing the guide, posting to youtube and maintaining some kind of channel/expectation there is high friction, so I just post it here hoping other people make more consumable content I guess :P

Ryan Florence's profile picture
Ryan Florence1 year ago

oops, sorry for the shaky camera, I didn't bother plugging in my real one and used the display, that bounces around as I type 😑

Barrett's profile picture
Barrett1 year ago

learning something new every day

Kent C. Dodds ⚡'s profile picture
Kent C. Dodds ⚡1 year ago

That's neat!

Dibas Dauliya's profile picture
Dibas Dauliya1 year ago

huge fan of your teaching style!

Amir | Amir5000.eth's profile picture
Amir | Amir5000.eth1 year ago

Wow wish I knew about this when it came out 😅 super cool and will be using asap!

Abdellah's profile picture
Abdellah1 year ago

I like the standard web platform nuggets on your videos

anandAtTess's profile picture
anandAtTess1 year ago

Wow, I needed this. Thanks Ryan.

Related Videos