Skip to content

Replace lifecycle functions with UNSAFE_ versions - #12502

Merged
offtherailz merged 2 commits into
geosolutions-it:masterfrom
jna4k:replace-with-UNSFE_-functions
Jul 28, 2026
Merged

offtherailz merged 2 commits 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.

@offtherailz
offtherailz enabled auto-merge (squash) July 28, 2026 13:49
@offtherailz offtherailz modified the milestones: 2027.01.00, 2026.03.00 Jul 28, 2026
@offtherailz

Copy link
Copy Markdown
Member

@tdipisa this is safe and can go directly on master, so I changed target to 2026.03.00 (as current master)

@offtherailz

Copy link
Copy Markdown
Member

@jna4k Thank you very much for the contribution ❤️ I'd like to see less warnings too

@offtherailz
offtherailz merged commit abb9f16 into geosolutions-it:master Jul 28, 2026
10 checks passed
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