Aws-mobile-appsync-sdk-js: componentWillMount/componentWillReceiveProps is deprecated

Created on 7 Apr 2018  路  1Comment  路  Source: awslabs/aws-mobile-appsync-sdk-js

I am getting a warning with componentWillMount and componentWillReceiveProps.

screen shot 2018-04-07 at 11 04 43 am

screen shot 2018-04-07 at 11 05 35 am

bug investigating

Most helpful comment

This is part of the React 16.3.0 update. Those methods will be removed somewhere around React 17.0.0
But we have a replacement for those: static getDerivedStateFromProps(nextProps, prevState) and getSnapshotBeforeUpdate(prevProps, prevState)
Hopefully Appsync team will update to new lifecycle methods soon
React blogpost regarding this:
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

>All comments

This is part of the React 16.3.0 update. Those methods will be removed somewhere around React 17.0.0
But we have a replacement for those: static getDerivedStateFromProps(nextProps, prevState) and getSnapshotBeforeUpdate(prevProps, prevState)
Hopefully Appsync team will update to new lifecycle methods soon
React blogpost regarding this:
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yarax picture yarax  路  3Comments

yhenni1989 picture yhenni1989  路  3Comments

ciocan picture ciocan  路  4Comments

e-yoshi picture e-yoshi  路  3Comments

schickling picture schickling  路  3Comments