next-react-server-components
next-react-server-components copied to clipboard
Breaks browser button behavior and unnecessarily re-renders page
Reproduction:
- Go to https://next-rsc-demo.vercel.sh/csr or https://next-rsc-demo.vercel.sh/rsc
- Click into a post's comments
- See skeleton and wait for "loading comments"
- Toggle close one of the comment threads.
- Click browser back button, to go back to main page.
- Click browser forward button.
- Problem: Now you have to experience step 3. again.
- Problem: The comment thread you previously toggled will now be untoggled. Due to the re-rendering.
Expectation:
Clicking browser Forward button in step 6. should simply take you to the page you previously just saw. Also, the state of anything you toggled on that page should be the same as how you put it when you clicked the browser Back button.