Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relies on react-dom/server #18

Closed
jooj123 opened this issue Sep 19, 2017 · 1 comment
Closed

Relies on react-dom/server #18

jooj123 opened this issue Sep 19, 2017 · 1 comment

Comments

@jooj123
Copy link

jooj123 commented Sep 19, 2017

I have noticed that this lib relies on react-dom/server being used on client code

Here:

import { renderToStaticMarkup } from 'react-dom/server'

and here:

renderToStaticMarkup(React.createElement('noscript', null, children))

Which causes

    at propsWithNoScriptRender (@domain-group_fe-pa-listing-details_0.32.11_2.2.1_client.js:68415)
    at Lazy.render (@domain-group_fe-pa-listing-details_0.32.11_2.2.1_client.js:67848)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (react.js:5941)
    at ReactCompositeComponentWrapper._renderValidatedComponent (react.js:5961)
    at ReactCompositeComponentWrapper.wrapper [as _renderValidatedComponent] (react.js:12353)
    at ReactCompositeComponentWrapper.mountComponent (react.js:5574)
    at ReactCompositeComponentWrapper.wrapper [as mountComponent] (react.js:12353)
    at Object.mountComponent (react.js:12978)
    at ReactCompositeComponentWrapper.mountComponent (react.js:5579)
    at ReactCompositeComponentWrapper.wrapper [as mountComponent] (react.js:12353)

on client code, react-dom/server as far as im aware should not be used on client code

@jooj123 jooj123 changed the title Doesnt correctly support SSR Relies on react-dom/server Sep 20, 2017
@Merri
Copy link
Owner

Merri commented Oct 2, 2017

react-dom/server is perfectly valid to be used on client side (they resolved naming confusion by calling it react-dom-server.browser in React 16).

These is currently an issue in React 16 that causes an incorrect warning with noscript elements: facebook/react#10993

@Merri Merri closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants