passing in json from server side page to client side page
Unanswered
Porcelaine posted this in #help-forum
PorcelaineOP
hello! i am a first time next.js question so bare with me if the question is too straightforward. i have two pages, one called Loading.tsx (server side), and Clips.tsx (client side). There is an async call called postVideo. When it is complete, I want to redirect to Clips.tsx while passing in the json into Clips without exposing it in the URL. what is the best way to do it? i don't have a good understanding of props at the moment.
2 Replies
You can use state management lib like Jotai
State can be read and write only in client component, so you can create a client component for loading page and pass the json from server loading component to client loading component. Set the state in the client component(loading) to json data and then read the state from Clips component.
State can be read and write only in client component, so you can create a client component for loading page and pass the json from server loading component to client loading component. Set the state in the client component(loading) to json data and then read the state from Clips component.
Satin Angora
how much experience do u have with react