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

React 16 incompatibility #335

Closed
kimniche opened this issue Nov 15, 2017 · 9 comments
Closed

React 16 incompatibility #335

kimniche opened this issue Nov 15, 2017 · 9 comments

Comments

@kimniche
Copy link

Thanks for an awesome plugin! Any chance this will be react-16-friendly soon?

@marciovicente
Copy link

+1

1 similar comment
@mauricio-scardaccione
Copy link

+1

@mike-marcacci
Copy link

mike-marcacci commented Dec 1, 2017

In what ways is this incompatible? Very basic use is currently working for me in development/testing.

Edit: I have since had to stop using helmet, since it had some infinite recursion issue, resulting in max call stack errors. I'm not sure if this is the problem being discussed here, so it would be nice if the ticket had some more details. Lifecycle methods are sufficient for now, but this is a really cool library that I'd like to use!

@kimniche
Copy link
Author

kimniche commented Dec 4, 2017

helmet_js_and_helmet_js_ _website4_ _lib_ _react-helmet

This PropType issue was the incompatibility I experienced; I didn't dig too far into it (wound up just going with React 16 portals) but it may very well have been some oddity with my babel installation, although I haven't encountered anything like this before

@geyang
Copy link

geyang commented Feb 1, 2018

@kimniche is there any update on this issue? Is this a bug at all? I'm using 16.2.0 and it works okay.

@rladigital
Copy link

We're getting an error that appears to be related to this issue, whilst working on a Gatsby site https://github.com/rladigital/rla-static-site. Interestingly the dependancies are all up to date, and if you yarn install using the current yarn.lock file (as of https://github.com/rladigital/rla-static-site/commit/29a493dcec6a02172b73d90fed9967d4c2fb6c08) it works fine. However when doing a yarn upgrade one of the packages there causes this error...

`error There was an error compiling the html.js component for the development server.

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

239 | }(_react2.default.Component), _class.propTypes = {
240 | base: _propTypes2.default.object,

241 | bodyAttributes: _propTypes2.default.object,
| ^
242 | children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),
243 | defaultTitle: _propTypes2.default.string,
244 | defer: _propTypes2.default.bool,

WebpackError:

  • Helmet.js?718e:241 Parser.pp$4.raise
    ~/react-helmet/lib/Helmet.js?718e:241:1

  • react.development.js?1871:438 Parser.pp.unexpected
    ~/react/cjs/react.development.js?1871:438:1

  • react.development.js?1871:416 Parser.pp.semicolon
    ~/react/cjs/react.development.js?1871:416:1

  • react.development.js?1871:674 Parser.pp$1.parseReturnStatement
    ~/react/cjs/react.development.js?1871:674:4

  • react.development.js?1871:534 Parser.pp$1.parseStatement
    ~/react/cjs/react.development.js?1871:534:1

  • react.development.js?1871:816 Parser.pp$1.parseBlock
    ~/react/cjs/react.development.js?1871:816:1

  • Helmet.js?718e:125 Parser.pp$3.parseFunctionBody
    ~/react-helmet/lib/Helmet.js?718e:125:1

  • react.development.js?1871:900 Parser.pp$1.parseFunction
    ~/react/cjs/react.development.js?1871:900:1

  • react.development.js?1871:653 Parser.pp$1.parseFunctionStatement
    ~/react/cjs/react.development.js?1871:653:1

  • react.development.js?1871:529 Parser.pp$1.parseStatement
    ~/react/cjs/react.development.js?1871:529:1

  • react.development.js?1871:816 Parser.pp$1.parseBlock
    ~/react/cjs/react.development.js?1871:816:1

  • Helmet.js?718e:125 Parser.pp$3.parseFunctionBody
    ~/react-helmet/lib/Helmet.js?718e:125:1

  • react.development.js?1871:900 Parser.pp$1.parseFunction
    ~/react/cjs/react.development.js?1871:900:1

  • warning.js?8a56:11 Parser.pp$3.parseExprSubscripts
    ~/fbjs/lib/warning.js?8a56:11:1

  • invariant.js?4599:46 Parser.pp$3.parseMaybeUnary
    ~/fbjs/lib/invariant.js?4599:46:1

  • emptyObject.js?42e4:13 Parser.pp$3.parseExprOps
    ~/fbjs/lib/emptyObject.js?42e4:13:1

  • Helmet.js?718e:185 Parser.pp$3.parseExprList
    ~/react-helmet/lib/Helmet.js?718e:185:1

  • emptyFunction.js?2a3b:30 Parser.pp$3.parseExprAtom
    ~/fbjs/lib/emptyFunction.js?2a3b:30:1

  • warning.js?8a56:11 Parser.pp$3.parseExprSubscripts
    ~/fbjs/lib/warning.js?8a56:11:1
    `

image

@sosaucily
Copy link

sosaucily commented Feb 24, 2018

This error that @kimniche is pointed to is because React moved the prop-types into it's own package instead of being in the react package.

I see this is fixed in Helmet 5.0.3.

The tricky bit for me what that this repo lists 5.0.0 as the current release version, but using that won't work after react 15.4.X

So make sure you're above 5.0.3

@jamsea
Copy link
Contributor

jamsea commented Feb 26, 2018

I'm closing this because prop-types has been added in the latest release. Tag me if this is still an issue

@jamsea jamsea closed this as completed Feb 26, 2018
@fiatjaf
Copy link

fiatjaf commented May 2, 2018

@jamsea I believe this is an issue because react-side-effect isn't working with server rendering anymore. See gaearon/react-side-effect#40, please.

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

9 participants