Task #1915
closed
Task #1846: Upgrade the frontend
Replace a UNSAFE_componentWillReceiveProps(nextProps)
Added by Vít Švanda about 5 years ago.
Updated about 5 years ago.
Description
Replace deprecated UNSAFE_componentWillReceiveProps(nextProps) and find better pattern.
- Description updated (diff)
I implemented dynamic React key to every generated Routes. Key is composed from id of route and full current URL. If URL (some identificator) changed, then Route and nested component will be unmounted and created again as new.
I removed UNSAFE_componentWillReceiveProps from a 31 files. Typically from details.
This pattern is experimental and I need to more testing it. So commit below will be important :-).
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/bfc281b7f366d5f6a39ff2650bb1126da9204df4
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 0 to 90
- Related to Task #1891: Request detail localizations don't change added
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I tested warious contents changed by commit above and I did a code review - most impotrant is creating unique key for child route component, it's awesome idea, thx!
- Status changed from Resolved to Closed
- Related to Defect #2500: Role attributes are not displayed on the first load of the approval task added
Also available in: Atom
PDF