Skip to content

Conversation

@iamnamananand996
Copy link
Contributor

@iamnamananand996 iamnamananand996 commented Mar 6, 2024

detected Legacy component lifecycle

  • componentWillMount -> componentDidMount
  • componentWillReceiveProps -> componentDidUpdate
  • componentWillUpdate -> componentDidUpdate

grit studio link: https://app.grit.io/studio?key=pmcyLDVyDHERfODgtvwUk

detected Legacy component lifecycle
- `componentWillMount` -> `componentDidMount`
- `componentWillReceiveProps` -> `componentDidUpdate`
- `componentWillUpdate` -> `componentDidUpdate`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aren't direct replacements, so ideally we have some logic to detect things like when getSnapshotBeforeUpdate should be used. See https://legacy.reactjs.org/docs/react-component.html#unsafe_componentwillupdate.

@@ -0,0 +1,135 @@
---
title: Update React legacy component
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Update React legacy component
title: Remove legacy React lifecycle methods

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.

2 participants