How to Build a Headless WordPress Blog with Next.js and GraphQl
Learn how to build a headless WordPress blog with Next.js 15 using the powerful App Router and TypeScript! In this tutorial, we’ll connect WordPress as the backend via the GraphQl plugin and create a dynamic, modern blog frontend. Perfect for developers looking to harness the flexibility of WordPress and the speed of Next.js!
Hi Raddy! Thank you for sharing this! This is amazing.
But I’ve run into this error, any idea what I can do to fix it? I’ve tried many different things but still it doesn’t help 🙁 Appreciate it if you can have a look.
Hydration failed because the server rendered HTML didn’t match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used
– A server/client branch `if (typeof window !== ‘undefined’)`.
– Variable input such as `Date.now()` or `Math.random()` which changes each time it’s called.
– Date formatting in a user’s locale which doesn’t match the server.
– External changing data without sending a snapshot of it along with the HTML.
– Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
See more info here: https://nextjs.org/docs/messages/react-hydration-error
– data-google-analytics-opt-out=””
It could be any of the reasons that you’ve listed. Have you tried in a private browser mode? Do you have a Github link to the project I could have a look at?