NodeFactoryIo / react-web3-starter

Starter repo with react configurations and web3 boilerplate.
2 stars 0 forks source link

React Router Promp #8

Open BeroBurny opened 3 years ago

BeroBurny commented 3 years ago

Story: in some cases we want to block user navigation and inform user why is not possible to do page change/modal close (for input forms etc...)

example of usage https://codedaily.io/tutorials/46/Prevent-Navigation-with-the-React-Router-Prompt-Component-When-Data-is-Being-Edited or https://scotch.io/courses/using-react-router-4/blocking-transitions

guide material https://medium.com/@michaelchan_13570/using-react-router-v4-prompt-with-custom-modal-component-ca839f5faf39 https://medium.com/javascript-in-plain-english/creating-a-custom-userconfirmation-modal-with-the-react-router-prompt-dc1faa5a65a0

additional material (code) https://stackoverflow.com/questions/56664622/how-to-display-component-using-react-router-prompt-to-prevent-or-allow-route-c https://github.com/ZacharyRSmith/react-router-navigation-prompt

morrigan commented 3 years ago

Sure. Let's define some Modal and/or Form components that can have this