React-color: componentWillReceiveProps causes React.StrictMode to error

Created on 16 Dec 2018  路  4Comments  路  Source: casesandberg/react-color

As per https://reactjs.org/docs/strict-mode.html#identifying-unsafe-lifecycles, might want to update componentWillReceiveProps to getDerivedStateFromProps or some other "safe" lifecycle method so that components using this library can adhere to React's new StrictMode

All 4 comments

Thanks for reporting.

This project is still using React 15, thus we don't yet have getDerivedStateFromProps which comes in 16.3.

@casesandberg any plans on upgrading to React 16?

Update:

Looks like we'll be getting React 16 in v3 馃檪 https://github.com/casesandberg/react-color/blob/3.0.0/package.json#L64

馃槑

I am going to close this as we will be using getDerivedStateFromProps in 3.0.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Glutnix picture Glutnix  路  4Comments

foreverpinetree picture foreverpinetree  路  3Comments

scottbarrow picture scottbarrow  路  6Comments

stevenxxiu picture stevenxxiu  路  6Comments

redguardtoo picture redguardtoo  路  4Comments