question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Server Rendering..?

See original GitHub issue

I’m guessing this component isn’t compatible with React server rendering…?

ReferenceError: window is not defined
    at null.componentWillMount (C:\node\crusader-uk\node_modules\react-responsive-carousel\lib\components\Thumbs.js:47:9)
    at C:\node\crusader-uk\node_modules\react-dom\lib\ReactCompositeComponent.js:348:23
    at measureLifeCyclePerf (C:\node\crusader-uk\node_modules\react-dom\lib\ReactCompositeComponent.js:75:12)
    at null.ReactCompositeComponent.performInitialMount (C:\node\crusader-uk\node_modules\react-dom\lib\ReactCompositeComponent.js:347:9)
    at null.ReactCompositeComponent.mountComponent (C:\node\crusader-uk\node_modules\react-dom\lib\ReactCompositeComponent.js:258:21)
    at Object.ReactReconciler.mountComponent (C:\node\crusader-uk\node_modules\react-dom\lib\ReactReconciler.js:46:35)
    at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (C:\node\crusader-uk\node_modules\react-dom\lib\ReactMultiChild.js:238:44)
    at ReactDOMComponent.Mixin._createContentMarkup (C:\node\crusader-uk\node_modules\react-dom\lib\ReactDOMComponent.js:653:32)
    at ReactDOMComponent.Mixin.mountComponent (C:\node\crusader-uk\node_modules\react-dom\lib\ReactDOMComponent.js:520:29)
    at Object.ReactReconciler.mountComponent (C:\node\crusader-uk\node_modules\react-dom\lib\ReactReconciler.js:46:35)

Any plans to support server rendering…?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leandrowdcommented, Feb 26, 2017

Hi @stephen-last, I’ve moved the event bindings to componentDidMount and I believe it will be enough to fix your problem. Try the latest version (3.1.2) and let me know if you still have issues 😉

Cheers

0reactions
stephen-lastcommented, Feb 28, 2017

@leandrowd Morning! Really sorry for the late response. I’ve just tried this and it works now, server rendering nicely, so you can add that to your list of features. Many thanks for your time on this! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactDOMServer – React
Render a React element to its initial HTML. React will return an HTML string. You can use this method to generate HTML on...
Read more >
Improve app performance with React server-side rendering
Server -side rendering is when content on your webpage is rendered on the server and not on your browser using JavaScript. For example,...
Read more >
A beginner's guide to React Server-Side Rendering (SSR)
A beginner's guide to React Server-Side Rendering (SSR). In this lesson, we are going to talk about server-side rendering (SSR), its benefits, ...
Read more >
How to Enable Server-Side Rendering for a React App
Server -side rendering (SSR) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a ......
Read more >
How to implement server-side rendering in your React app in ...
In Client-side rendering, your browser downloads a minimal HTML page. It renders the JavaScript and fills the content into it. Server-side ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found