Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Frontend
Target version:
Start date:
10/29/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Replace deprecated UNSAFE_componentWillReceiveProps(nextProps) and find better pattern.


Related issues

Related to IdStory Identity Manager - Task #1891: Request detail localizations don't changeClosedVít Švanda10/07/2019

Actions
Related to IdStory Identity Manager - Defect #2500: Role attributes are not displayed on the first load of the approval taskClosedRadek Tomiška09/23/2020

Actions
Actions #1

Updated by Vít Švanda about 5 years ago

  • Parent task set to #1846
Actions #2

Updated by Vít Švanda about 5 years ago

  • Description updated (diff)
Actions #3

Updated by Vít Švanda about 5 years ago

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

Actions #4

Updated by Vít Švanda about 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 0 to 90
Actions #5

Updated by Radek Tomiška about 5 years ago

  • Related to Task #1891: Request detail localizations don't change added
Actions #6

Updated by Radek Tomiška about 5 years ago

  • 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!

Actions #7

Updated by Vít Švanda about 5 years ago

  • Status changed from Resolved to Closed
Actions #8

Updated by Radek Tomiška about 4 years ago

  • Related to Defect #2500: Role attributes are not displayed on the first load of the approval task added
Actions

Also available in: Atom PDF