'How do I update a specific component fetching data using react hooks? - mongoose, mern app

I want to update my feed to show only the posts that my api gets when I click a button on the categories inside the Sidebar.jsx List: onClick{handler} The objective is to update my feed to only show posts related to the category selected.

The api in question: api

My feed: feed is currently showing every post created, if it's the profile page shows only user posts, what's the best approach to the onClick action on the sideBarList to do what I want? I'm having trouble with handlers because I'm new to this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source