Skip to content

Replace lifecycle functions with UNSAFE_ versions#12502

Open
jna4k wants to merge 1 commit into
geosolutions-it:masterfrom
jna4k:replace-with-UNSFE_-functions
Open

Replace lifecycle functions with UNSAFE_ versions#12502
jna4k wants to merge 1 commit into
geosolutions-it:masterfrom
jna4k:replace-with-UNSFE_-functions

Conversation

@jna4k

@jna4k jna4k commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR replaces componentWillReceiveProps and componentWillUpdate with the UNSAFE_componentWillReceiveProps and UNSAFE_componentWillUpdate lifecycle functions.

This change is necessary is to make sure that our legacy components will work with react 17+ see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html

This change was done as a part of the React 19 upgrade, see #12500

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#12500
We are currently using the componentWillReceiveProps and componentWillUpdate lifecycle functions.

What is the new behavior?

We will no longer use the componentWillReceiveProps and componentWillUpdate lifecycle functions, and will instead us.e the UNSAFE_componentWillReceiveProps and UNSAFE_componentWillUpdate versions that are compatible with react 17+

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

…ith UNSAFE_componentWillReceiveProps and UNSAFE_componentWillUpdate
@cla-bot cla-bot Bot added the CLA Ready label Jun 16, 2026
@tdipisa tdipisa linked an issue Jun 16, 2026 that may be closed by this pull request
@tdipisa tdipisa added this to the 2027.01.00 milestone Jun 16, 2026
@tdipisa

tdipisa commented Jun 16, 2026

Copy link
Copy Markdown
Member

@jna4k thank you for opening that. PSC members will check the issue definition and this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React 19

5 participants