Slate-React (Next.js) Slate isn't updating data after route change
See original GitHub issue``Description Using Next.js, SWR had tried SSR but still no luck 😕
On first load the data is fetched using SWR and passed to Slate. Once I change routes the data is fetched but Slate isn’t getting the data from the Database anymore
Recording https://loom.com/share/508c7c4ad5e040d7bc42fc8955c593c1
Sandbox A link to a sandbox where the error can be reproduced. (You can start from the base sandbox here: https://codesandbox.io/s/slate-reproductions-c7gyg or refer to the Slate website too.)
Expectation Everytime I change routes Slate should update its value to match onces coming in from the DB
Environment
- Slate Version: “slate”: “^0.85.0”,
- Operating System: macOS
- Browser: Chrome
Issue Analytics
- State:
- Created 10 months ago
- Comments:5
Top Results From Across the Web
NextJS initial state is not updating when routing to same page ...
When using NextJS, getInitialProps is called before the page renders only for the first time. On subsequent page renders (client side ...
Read more >Creating a Single-Page App in React using React Router
Routing is where you try to map URLs to destinations that aren't physical pages such as the individual views in your single-page app....
Read more >Slate: Introduction
The data model Slate uses—specifically how operations are applied to the document—has been designed to allow for collaborative editing to be layered on...
Read more >Build a Full Stack App with Next.js, Tailwind, tRPC and Prisma ...
When we create a TypeScript project that has both a Rest Api and a web app, it becomes challenging to... Tagged with nextjs,...
Read more >Headless WordPress with React and NextJS (Part 1)
We'll change this up later, but for now, we'll use this to make sure our routes are working once they're set up. Here's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NorkzYT Think I may have found a solution
https://www.loom.com/share/e69b259f95e6465196d33e2b70815501
@wrongakram Thank you very much for the video, I appreciate it. I saw the video and this looks promising as to what I want to accomplish. Please do advise if your solution stops working.