davnicwil / react-frontload

Async data loading for React components, on client & server
451 stars 21 forks source link

Deprecated componentWillMount #40

Closed manian-kumaran closed 5 years ago

manian-kumaran commented 5 years ago

Hi,

In the SSR side, it produces warning:

Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

Please update the following components: FrontloadConnectedComponent

Thanks.

davnicwil commented 5 years ago

Hi,

Ah yes, this is fine and I'm aware of it - you can ignore the warning.

It's just that componentWillMount will be renamed in the next react version 17.x and will work slightly differently, because of some restructuring of how React works internally (the concurrent mode fibre architecture specifically).

When 17.x comes out I'll need to update react-frontload accordingly. But the current latest version will continue to work fine with all react 16.x versions.

manian-kumaran commented 4 years ago

Hi,

Ah yes, this is fine and I'm aware of it - you can ignore the warning.

It's just that componentWillMount will be renamed in the next react version 17.x and will work slightly differently, because of some restructuring of how React works internally (the concurrent mode fibre architecture specifically).

When 17.x comes out I'll need to update react-frontload accordingly. But the current latest version will continue to work fine with all react 16.x versions.

React v17 is RC now: https://reactjs.org/blog/2020/08/10/react-v17-rc.html Is it safe to upgrade to v17 with regard to react-frontload?

Thanks.

davnicwil commented 4 years ago

Hi @manian-kumaran, I'll have to try it out, but for now I would advise against it.

Most likely, though, if there is a problem it will be a pretty simple change to make react-frontload compatible with v17.