Helloo, I'm updating the task information in the database via a POST request inside the update-task interceptor. However, after making the POST request, the local task state is not updating as expected.
In contrast, when I don't include the POST request, the task state updates correctly like it works in the demos. How can I ensure that the task state is updated even after performing the POST?
Here's the code I'm using:
useEffect(() => {
const api = apiRef.current;
if (!api) return;
api.intercept("update-task", async (data) => {
// some validation and logic
await apiClient.post(`https://api.com/assign_responsible/`, bodyObject);
return true; // should this be different?
});
}, [apiRef.current]);
What do I need to return after the POST? Any help is appreciated!