Next.js Discord

Discord Forum

Modules imported in Client and Server component are isolated?

Unanswered
Cyanide posted this in #help-forum
Open in Discord
Avatar
In this configLibServiceProvider the file @/config has a global variable of class object or say isInitiate I called
await configLibServiceProvider.prepare({
    initialFetchMode: "file",
  });


Which is responsible for initiating the object. However, in client component the same which was init earlier seems reset again? Are there any boundaries in runtime in which C and S components are rendered? How can I share data between the two?
Image

1 Reply

Avatar
Image