boolean-uk / software-developer

0 stars 0 forks source link

Update React Router #177

Closed dearshrewdwit closed 7 months ago

dearshrewdwit commented 1 year ago

Recommended to update router.

https://reactrouter.com/en/main/routers/picking-a-router#using-v64-data-apis

dogezen commented 1 year 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?)

dogezen commented 1 year ago

Key things to review with the novel approach:

vherus commented 1 year ago

Thanks Carlo, currently investigating this. Some considerations:

createBrowserRouter(
  createRoutesFromElements(
    <Route path="/" element={<Root />}
      <Route index element={<PageOne />} />
      <Route path="/two" element={<PageTwo />} />
    </Route>
  )
)
vherus commented 1 year ago

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:

  1. Remove the Green Grocers challenge from JS dom, which would offer an extra 2 days to put into React
  2. Brewery Tours is notoriously difficult for a lot of students. We could remove the Brewery Tours challenge, replacing it with Green Grocers, which offers an extra 3 days for React
vherus commented 1 year ago

Current plan:

Use https://jsonplaceholder.typicode.com/ as an API

dearshrewdwit commented 1 year ago

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

vherus commented 1 year ago

New challenge: https://github.com/boolean-uk/react-cohort-dashboard-challenge