Support for SSR
See original GitHub issueHello.
This module doesn’t support server side rendering. When building on Netlify or on local production, I get an error that says “‘window’ is not available during server side rendering”, and a bunch of code that is returned from the EditorJS plugin(s).
This is how I currently fixed this:
const MyComponent = () => {
if (typeof window !== 'undefined') {
const Editor = require('./editor').default;
return <Editor />;
}
return null;
};
Even though this works, it’s very ‘hacky’. Please fix this.
I’m using GatsbyJS version 2.23.12.
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (2 by maintainers)
Top Results From Across the Web
Server-Side Rendering - Vite
Vite provides built-in support for server-side rendering (SSR). The Vite playground contains example SSR setups for Vue 3 and React, which can be...
Read more >Server-Side Rendering (SSR) - Vue.js
Support Vue SFCs and other build step requirements. In fact, we will need to coordinate two builds for the same app: one for...
Read more >Server Side Rendering - SAFE Documentation
Server-Side Rendering (SSR) means that some parts of your application code ... Better SEO support, as web crawlers will directly see the fully...
Read more >SSR Support for AWS Amplify JavaScript Libraries
Enabling Server-Side Rendering (SSR) support in an Amplify app. When using the Amplify CLI, the aws-exports.js file gets created and updated ...
Read more >What is Server-Side Rendering (SSR)? What Frameworks ...
What Frameworks Support SSR for Web Development? Delivering vital information and content to the browser is necessary for frontends to load quickly.
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 Free
Top 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
Using the require statement in the
useEffect
hook solved this issue for me inNextjs
. ThanksThis should work: