Next.js Discord

Discord Forum

Storing Object between pages

Unanswered
Evalon posted this in #help-forum
Open in Discord
Avatar
How can i store/change/access a variable thru pages?
e.g: lets say im on the "/login", and i want to store the user email before switching page so when i go to the other page i can show the email, or when i go to a page i need to fetch data based on that email, how can i store the user object so that i can access/change it anytime?

3 Replies

Avatar
you can use route slugs
Avatar
Can you please explain? I new to next and web dev in general, so I don't get it