Skip to content

Warn if you pass a hidden prop to Activity#32916

Merged
sebmarkbage merged 1 commit into
facebook:mainfrom
sebmarkbage:activityhiddenwarning
Apr 15, 2025
Merged

Warn if you pass a hidden prop to Activity#32916
sebmarkbage merged 1 commit into
facebook:mainfrom
sebmarkbage:activityhiddenwarning

Conversation

@sebmarkbage
Copy link
Copy Markdown
Contributor

@sebmarkbage sebmarkbage commented Apr 15, 2025

Since hidden is a prop on arbitrary DOM elements it's a common mistake to think that it would also work that way on <Activity> but it doesn't. In fact, we even had this mistakes in our own tests.

Maybe there's an argument that we should actually just support it but we also have more modes planned.

So this adds a warning. It should also already be covered by TypeScript.

@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Apr 15, 2025
@sebmarkbage sebmarkbage merged commit 539bbdb into facebook:main Apr 15, 2025
464 of 468 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2025
Since `hidden` is a prop on arbitrary DOM elements it's a common mistake
to think that it would also work that way on `<Activity>` but it
doesn't. In fact, we even had this mistakes in our own tests.

Maybe there's an argument that we should actually just support it but we
also have more modes planned.

So this adds a warning. It should also already be covered by TypeScript.

DiffTrain build for [539bbdb](539bbdb)
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2025
Since `hidden` is a prop on arbitrary DOM elements it's a common mistake
to think that it would also work that way on `<Activity>` but it
doesn't. In fact, we even had this mistakes in our own tests.

Maybe there's an argument that we should actually just support it but we
also have more modes planned.

So this adds a warning. It should also already be covered by TypeScript.

DiffTrain build for [539bbdb](539bbdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants