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

ui: Refactor lifecycle methods #409

Merged
merged 6 commits into from
Nov 29, 2019
Merged

ui: Refactor lifecycle methods #409

merged 6 commits into from
Nov 29, 2019

Conversation

Stezido
Copy link
Contributor

@Stezido Stezido commented Nov 28, 2019

Description

React will deprecate some of their lifecycle methods. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html for details.

Lifecycle methods to be changed:

  • componentWillMount
  • componentWillReceiveProps
  • componentWillUpdate

Tasks

  • Set initial state in the constructor
  • Move code with side effects to componentDidMount
  • Move data fetching code or side effects to componentDidUpdate

Closes #384
Closes #391

use constructor for init local state or binding event handler methods to an instance
use componentdidMount for side effects after the DOM is build
use componentdidUpdate for fetching data or side effects depending on an updated prop
react-router-redux is deprecated so its replaced by connected-react-router
add es-lint command to overwriting rules
react-sortable-hoc is deleting array-move dep in the next major version
New release removes componentwillmount-deprecation-warning
@openkfwCI
Copy link

openkfwCI commented Nov 28, 2019

NotesTime
✔️Note for Reviewer: E2E tests on remote server succeededThu, 28 Nov 2019 15:15:05 +0000

Generated by E2E-Test

@Stezido Stezido merged commit 1535828 into master Nov 29, 2019
@mathiashoeld mathiashoeld deleted the refactor-lifecycle-methods branch March 10, 2020 13:35
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.

UI: Refactor lifecycle methods ui: Adapt new lifecycle methods
3 participants