Next.js Discord

Discord Forum

Filtering using an API with Server Side Components

Unanswered
Barrow's Goldeneye posted this in #help-forum
Open in Discord
Barrow's GoldeneyeOP
I have an endpoint that allows me to make get todos and also let me filter the by some params. In my next.js application I'm sotoring the data in a
const todos_list = getTodos();
. I'm using the async notation in my component in order to fetch in the server, let's suppose that I have a button and when I press that button I want to update my list to only fetch the todos that are finished. How can I achieve that without having to use the useState in my todos_list?

2 Replies