Next.js Discord

Discord Forum

Using Recoil in the context of Page Router

Unanswered
Texas leafcutting ant posted this in #help-forum
Open in Discord
Texas leafcutting antOP
I've noticed that when I use initializeState from recoil in _app.tsx, it only applies in the server and doesn;t re-run on the client. As I am trying to build a library, I want to be sure my users are not only running the provider on the server. Is there a good was to ensure the component I provide (which will contain the recoil provider) is run in the browser?

0 Replies