UPDATE: GOT IT! Maybe I should search a little longer before posting Qs, but sometimes writing the Q helps me find the issue. In this case I was loading the data from the DB in the topics page, instead of receiving state from the App.
What’s happening: I have a React app with a search input in navbar. The serach function is working as I intended. The functions are props passed from App , the top level component.
However when the state is updated the Main page which is routed to Topics doesn’t change.
Click on topics
Type in search
if you open the console log while typing in the seach bar (try typing “heart”) you can see the serach is working, but the topics page doesn’t change.
how do I send the filtered search from App through the router to the topics page?
(look in src folder for these files
UPDATE: When I use chrome’s devtools with the React tools, I can see that the APP state contains just the resource from the search, bu the Topics state still contains the original four.
Why doesn’t updating state in the App pass down to the Topics component? Can I get it to rerender? Is this a react router issue?