metafizzy / metafizzy/flickity
React (isomorphic server side) integration - ReferenceError: window is not defined
- Dominant language
- JavaScript
- Stars
- 7.6k
- Forks
- 593
- PR merge metrics
- No merged PRs in 30d
Description
Hi, Thank you for this cool library!
Is there a working example of flickity with react rendered on the server side??
I'm trying to integrate flickity in an isomorphic app which renders react also on the server using this [gist](https://gist.github.com/JoshBarr/f302ebf7f43ea596ad6a) and get the following error:
```
\node_modules\flickity\js\index.js:40
})( window, function factory( Flickity ) {
^
ReferenceError: window is not defined
```
Do you have any idea how to solve this issue?
Cheers
Ajar
Contributor guide
Research direction
Start with node_modules/flickity/js/index.js at the factory wrapper shown in the report, then inspect the React server-rendering setup in the linked gist. Reproduce the ReferenceError in the isomorphic rendering path and determine the supported integration approach; done means the server render completes without requiring window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100