final-form / final-form/react-final-form
Replace legacy life-cycle method to fit React 17 and after version
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### feature request
Have you considered rewriting the code and replace the legacy life-cycle method such as componentWillMount, componentWillUpdate?
### What is the current behavior?
Now I could see there are a lot of use of those functions but as mentioned by React
>UNSAFE_componentWillMount() is invoked just before mounting occurs. It is called before render(), therefore calling setState() synchronously in this method will not trigger an extra rendering. Generally, we recommend using the constructor() instead for initializing state.
>Avoid introducing any side-effects or subscriptions in this method. For those use cases, use componentDidMount() instead.
>This is the only lifecycle hook called on server rendering.
>Note
>This lifecycle was previously named componentWillMount. That name will continue to work until version 17. Use the rename-unsafe-lifecycles codemod to automatically update your components.
Contributor guide
Assessment
This issue has not been assessed yet.