Handle routes data using stateless protocol (using React Router)
summary
Solution shows a concrete pattern for passing per-route data using React Router (v5/v6), storing transient values in history state and only using a persistent store (Redux) as a temporary buffer when sending data on back navigation. The demo builds a small navigation/shopping-list/todo app that passes random numbers, uses replace then push to leave a trace, uses use back to return so history stays clean, and includes cleanup of Redux after consumption. The approach works and avoids global state for normal forward/back flows.
AI-written summary · about
chapters (10)
- 0:00Introduction and agenda
- 2:12Problem with route data loss
- 4:40Patterns and anti-patterns
- 9:19Forward navigation rules
- 11:47State per page approach
- 13:35Temporary data storage
- 16:04Circular navigation solution
- 19:15Live coding setup
- 24:17Demo of data preservation
- 28:15Summary and Q&A








