Open utterances-bot opened 3 years ago
Awesome! This is helping me a lot.
I have a question about user.loading. I know it is true in the initialState when the User object is empty. Does the user object being populated with data from the API change the boolean value from true to false because i dont see anywhere in the code where it changes.
I couldn't run this code. Getting this error: ./src/App.js Attempted import error: 'Switch' is not exported from 'react-router-dom'.
I also couldn't run the code due to
export 'Switch' (imported as 'Switch') was not found in 'react-router-dom'
Looks like Switch has been deprecated in favour of 'Routes', so importing that instead and using it works
Using React Router for a Single Page Application | Tania Rascia
React doesn't come with a built-in router, but we can easily achieve routing with the library. Routing is how a web applications direct…
https://www.taniarascia.com/using-react-router-spa/