203. Extracting Route Parameters
Changed from componentDidMount to componentDidMount as we are not updating this. this.props.match.params.id successfully passing route parameters and extracting them
205. Using switch to load a single route
<Switch> to ensure that only one route gets loaded at a time.
206. Navigating programmatically
navigation is about a stack of pages. push() allows you to push a new page onto the stack so back and forward buttons work
207. Additional info Regarding Active link
exact is set to treat as active.
208. Understanding Nested Routes
209. Creating Dynamic Nested Routes
Important to fix match.params.id
need to handle change in compoenetDidUpdate if component is already loaded through routing
210. Redirecting Requests
211. Conditional Redirects
212. Using the history prop to Redirect (Replace)
replace() or push(). new post was replaced on a stack of pages.
213. Working with Guards
214. Handling the 404 Case (Unknown Routes)
2nd line won't work together due to from='/' as it catches all routes
215. Loading Routes lazily
load asychronously only when its needed
216.
217.
218.
219. Useful Links
Assignment
Comments
Post a Comment