Repository navigation
[Core] Prepare components for React 19 - #11362
Open
HenriRabalais wants to merge 2 commits into
Open
HenriRabalais wants to merge 2 commits into
HenriRabalais wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
React 19 removes string refs and ignores
defaultPropson function components. The replacements for both work on React 18 too, so they can go in ahead of the version bump in #11358.Changes
createRef(the save message in candidate_parameters, the panes in instrument_builder and the required fields in the media upload form), and the ones nothing reads are removed.react/no-string-refslint rule is on, so ESLint rejects a ref written as a quoted string.FamilyInfono longer loops over its refs after saving to clear the form. Its fields are controlled byformData, which the save already resets.IssueFormno longer hasisValidForm. It only looked up refs namedtitleandassignee, which no field has.defaultPropstake their defaults as default parameters:jsx/Panel.js, biobank'sCustomFields, the electrophysiology viewer, dqt and the statistics widgets. Where a component passespropsalong as a whole, it rebuildspropsfrom its parameters, so the rest of the component reads the same.Testing Instructions
Related Issues