Skip to content
Discussion options

You must be logged in to vote

You can not use randomization like this. You should probably generate a random number in the getStaticProps and send that to the client so the server and the client renders the same data.

If you wish to render something random on the client only, you should use useEffect and set a value on a useState property

Does that make sense?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by timneutkens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants