Closed dearshrewdwit closed 7 months ago
The new react-router API does some "magic" in terms of loading data / attaching actions to routes:
https://reactrouter.com/en/main/start/tutorial#creating-contacts
This may be quite confusing / complex and removes some flexibility (ie. what if I have multiple forms on the same view?)
Key things to review with the novel approach:
Thanks Carlo, currently investigating this. Some considerations:
createBrowserRouter
function as in the documentation linked in the comments above, the second is closer to how we're currently using the package:createBrowserRouter(
createRoutesFromElements(
<Route path="/" element={<Root />}
<Route index element={<PageOne />} />
<Route path="/two" element={<PageTwo />} />
</Route>
)
)
Common Cohort 10 survey feedback showed students were frustrated with challenges being close together. The HTML & JS Dom units both contain 2 challenges very close together:
There are two potential things we could consider to free up time to expand the routing content:
Current plan:
Stop JSDom after Green Grocers, freeing up 5 days
Go straight into React
Extend Routing to 2 days
Repurpose DOM todo list as a React exercise
Break Address Book down into individual exercises, more explicitly define requirements
New challenge is to build the team dev sim dashboard (create, display, edit posts), include designs and style guides as requirements. Blank repo, students build from scratch
Outline new sequence first, start at the end (challenge)
Use https://jsonplaceholder.typicode.com/ as an API
To do list app that i used with experis - https://github.com/boolean-uk/react-tasks-with-local-api
Exercise was to update this implementation to use Fetch API to manage CRUD via a RESTful API
Solution - https://github.com/boolean-uk/react-tasks-with-local-api/tree/with-fetch
Recommended to update router.