Hi there! By any chance, is it possible to use Rea...
# announcements
f
Hi there! By any chance, is it possible to use React SDK for SSR in next.js?
f
yes
you can have the growth init and attribute setting in the getServerSideProps()
and use those values of the flags wherever you need
f
Ah I see, how do I pass the SDK output to the render method?
f
The props returned in the getServerSideProps() are passed in to the main page props
like this:
Copy code
export default function About({ message }) {
    return (
        <div>
            <h1>{message}</h1>
        </div>
    );
}
    
export function getServerSideProps() {
    return {
        props: { message: "Welcome to the About Page" },
    };
}
👍 1
f
thx
Merry Christmas
f
no problem, you too
f
@fresh-football-47124 I am still struggling with the SSR integration. You can pass only valid JSON as ServerSideProps. So I assume, that user assignment must be located in the page / components, right?