Details
-
Task
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
stripes-force 96, Firebird Sprint 99
-
2
-
Firebird
Description
The following components throw lint errors because they use the deprecated React lifecycle hook, componentWillUpdate.
componentWillUpdate is deprecated since React 16.3.0, use UNSAFE_componentWillUpdate instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillupdate
lib/Timepicker/Timepicker.js
To not use the UNSAFE method, we need to use getDerivedStateFromProps or componentDidUpdate. The former occurs before render, but is a static method, meaning it cannot access `this` (instance props). The latter occurs after render() and cannot update the state (which would cause flickering); it is often used to apply focus() to an element.
TestRail: Results
Attachments
Issue Links
- is blocked by
-
STCOR-208 Iterative move to New React Context API
-
- Closed
-
- relates to
-
UXPROD-2578 refactor away from componentWillReceiveProps
-
- In progress
-
-
STCOM-707 refactor Timepicker away from componentWillReceiveProps
-
- Closed
-