Next.js set state after insert, NULL issue
Hi. I want to update state after inserting a new row, but when receiving the data value I get NULL instead of the entire array of data from the database. I couldn't find a v2 example of this so I have been following the next todolist example from v1 in the examples archive.
I can fix this by adding my fetch function after setItems, but it re-renders the entire list of items instead of just adding 1. Is there a way around that? Thanks very much.
I can fix this by adding my fetch function after setItems, but it re-renders the entire list of items instead of just adding 1. Is there a way around that? Thanks very much.