I'm just starting to learn react and I'm wondering what the best way to structure one of my test projects.
The application is one page, and has to:
- Have a search that hits an external API, returning JSON.
- The JSON result will be shown to the User in a readable format
- Have buttons with dynamic links
- Have a dropdown with some of the json data
I'm thinking there should be a component for each of those, with the associations setup as the 'Search' being the parent component, with each of the other components inheriting directly from that..
For example:
app
│ ├── search component
│ │ ├── dropdown component
│ │ ├── list component
│ │ ├── button component
│ │
This feels like the wrong approach though. I was looking at redux for state management but thought it was a bit too overkill. Since I need access to the searches data for each of the components, is there a better way to structure this that allows for that? Thanks