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

Replace deprecated lifecycle methods #102

Merged
merged 3 commits into from
Oct 4, 2019
Merged

Conversation

DoctorHowser
Copy link
Contributor

componentWillRecieveProps and componentWillMount are deprecated and throwing warnings in the console. Refactored the code to use the new getDerivedStateFromProps method.

Refactored accordingly, as getDerivedStateFromProps needs to return the new state.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 81.517% when pulling e21658e on DoctorHowser:master into 6f7ec60 on headzoo:master.

@headzoo
Copy link
Owner

headzoo commented Oct 1, 2019

Looks good. I'm trying to track down the cause of this warning in the tests:

console.error node_modules/react-dom/cjs/react-dom.development.js:506
  Warning: PropChangeContainer: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.

I'll merge and push once I find the problem.

@headzoo headzoo merged commit f81d072 into headzoo:master Oct 4, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants