I have an action function that is populating the database with some info,the action sometimes takes 10 seconds or so in finishing the request that is like
const creatingData = await createdata();
Then I have a redirect that points to the created data
return redirect(`/myawesomepage/${creatingData.id}`);
The point is that when the page is loaded, the main content is not there, but if I reload the page all the content appears correctly.
I have tested with
throw redirect(`/myawesomepage/${creatingData.id}`);
But It has the same result. Im checking the documentation but I can not see how to wait for data or invalidating cache in order to force to load the page.