Skip to content

feat: detected Legacy component lifecycle #128

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
Contributor

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
Contributor

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