I'm looking to build the following functionality in a site similar to below: https://au.indeed.com/jobs?q=no%20experience&l=Melbourne%20VIC&from=searchOnHP&vjk=6c88ada376b9317e
What I mean is, I would like to try and build two components. A list of cards on the left and an info pane on the right which populates with information when you click on the left card.
What is the correct way to manage this? Would you use state on the left component and pass it through the tree or use redux and send the state to represent the information?
State is managed above the list, kind of like this:
const Container = ({things}) => {
const [selected,setSelected] = useState()
return (
<>
<ThingList things={things} onSelect={setSelected}/>
<DetailView thing={selected}/>
</>
)
}