Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

new React 15.5 broke build (fixed), lifecycle causes deprecation warnings (in review). #344

Closed
istarkov opened this issue Apr 7, 2017 · 18 comments
Assignees

Comments

@istarkov
Copy link
Contributor

istarkov commented Apr 7, 2017

Fixing now, seems like we have a problem with lifecycle method.

@istarkov
Copy link
Contributor Author

istarkov commented Apr 7, 2017

The problem with current lifecycle that it uses React.createClass, and this https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.createclass will break support of react 14 users (I'm still using it ;-()

@istarkov
Copy link
Contributor Author

istarkov commented Apr 7, 2017

Lifecycle #346

@istarkov istarkov changed the title new React 15.5 broke build new React 15.5 broke build, lifecycle causes deprecation warnings. Apr 7, 2017
@istarkov istarkov changed the title new React 15.5 broke build, lifecycle causes deprecation warnings. new React 15.5 broke build (fixed), lifecycle causes deprecation warnings (in review). Apr 7, 2017
@MichaelDeBoey
Copy link

Any update on this one? :-)

@istarkov
Copy link
Contributor Author

Yes, 11 days ago, see Releases

@istarkov
Copy link
Contributor Author

I forgot to close issue after enzyme update ;-)

@MichaelDeBoey
Copy link

@istarkov I still get the following warnings (from the lifecycle method):
Warning: A Component: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

Stacktrace:

printWarning	@	warning.js:36
warning		@	warning.js:60
createClass	@	ReactClass.js:628
(anonymous)	@	lifecycle.js:28
(anonymous)	@	createHelper.js:31

@TrySound
Copy link
Contributor

@MichaelDeBoey Remove node_modules and run npm install

@MichaelDeBoey
Copy link

@TrySound I did this, but still get the warning

@TrySound
Copy link
Contributor

@MichaelDeBoey Which version specified in package.json?

@MichaelDeBoey
Copy link

"recompose": "^0.21.0",

@istarkov
Copy link
Contributor Author

istarkov commented Apr 19, 2017

https://github.com/acdlite/recompose/releases/tag/v0.23.0

Must be ^0.23.0

And even better to have last

@mistadikay
Copy link

@MichaelDeBoey try this amazing tool https://semver.npmjs.com/ it'll help you to understand how versioning in npm works 😬

@MichaelDeBoey
Copy link

MichaelDeBoey commented Apr 19, 2017

Doh! 😓
Looked over that 😓 😕

@isSerge
Copy link

isSerge commented May 14, 2017

I still get this issue😒:
"react": "^15.5.4",
"recompose": "^0.23.4",

@istarkov
Copy link
Contributor Author

What issue? Please be specific.

@isSerge
Copy link

isSerge commented May 14, 2017

Warnings from the lifecycle method:
Warning: getInitialState was defined on lifecycle(Component), a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?

@istarkov
Copy link
Contributor Author

It's not "this issue" as you can see.

getInitialState now is not supported in lifecycle as React.createClass isn't used any more in recompose.

@isSerge
Copy link

isSerge commented May 14, 2017

Oh, I see, thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants