Hacker News new | ask | show | jobs
by djhartman 2972 days ago
1) A common pattern is having “page” components that render different layouts.

2) Yes, start out by learning to fetch data in componentDidMount and then calling set state with the result. It’s usually a good idea to do this at the top level of your app and pass it down to child components. Don’t look into Redux or MobX or anything like that until you run into problems. Most people do not need a separate library for managing state.

3. react-router is not “official” but it’s pretty damn close, probably the most popular. Look into next.js if you want client and server side routing.

1 comments

Thanks, this kind of advice is what I was looking for.

Sounds like I was overthinking calling the API, and I'll be using react-router for navigation.