TrueCar / react-launch-darkly

Simple component helpers to support LaunchDarkly in your React app.
MIT License
76 stars 20 forks source link

Components fail when server-rendered #63

Closed peterbee closed 6 years ago

peterbee commented 6 years ago

Server rendering is broken by attempting to use XMLHttpRequest in a non-browser environment.

Is this something that should be considered in these components? I can create a bunch of conditionals that only add these components when running in a browser, so I'm not sure if the responsibility should fall on the component or on the developer consuming it.

peterbee commented 6 years ago

Never mind, just found the SSR support in the docs.