NextJs and SSR
Flagster can be use in a SSR environment like NextJs, Remix and other frameworks.
Usage
Providers
Create a Providers component to wrap your app with the FlagsterProvider and pass the server state to the provider.
Layout
In your layout component, you can use the Providers component to wrap your app.
Middleware
You can create a middleware to generate an identity for the user and store it in a cookie.
That prevents the user from getting a new identity on every request.
identityGenerator generate for you a random identity for guest users.
You can instead use user id as identity if user is authenticated.
From that point the SDK usage is the same as the React SDK.