redux-first-history | Redux history binding support react-router - @reach/router - wouter - react-location | Router library
kandi X-RAY | redux-first-history Summary
kandi X-RAY | redux-first-history Summary
Redux history binding support react-router - @reach/router - wouter
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new history router
redux-first-history Key Features
redux-first-history Examples and Code Snippets
Community Discussions
Trending Discussions on redux-first-history
QUESTION
I have an App from create-reat-app. Very simple app with nav menu element and content element. When i click on button in the nav menu dashboard element will load in the content element. Everything worked perfectly. Then i introduced react-router so all changes happened without refreshing the browser. All goo so far.
Then i started playing with redux. Navigation on the left is for certain branches of business (i.e. London, Birmingham). After clicking on one, its id will save into redux store under page.currentBranch. Then the dashboard element will render based on what is in redux. It work fine when clicking on each one, but when hitting back or forward button, the url will change but dashboard still shows the info from the last button clicked as the redux store is not changing on browser back or forward buttons.
I have tried connected router, redux first history and multiple articles about this as well as looked through stackoverflow but still cant make this work
I Have created my first ever sandbox for this so you can understand how its all set up. Iam sure iam doing fundemegntally something wrong but cant figure out what :-)
Appreciate any help
...ANSWER
Answered 2021-Jan-20 at 10:54You could try using an useEffect hook and deleting/resetting the redux state to the wanted state:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install redux-first-history
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page