Skip to content

Conversation

@marklundin
Copy link
Collaborator

@marklundin marklundin commented Oct 28, 2025

This PR fixes a regression whereby certain props were being incorrectly overridden. Fixes #277

Now props can be excluded using the { exclude: string[] } option which omits them from the component schema.

Specifically 'mouse', 'touch', 'keyboard', 'gamepads', 'scene', 'scripts', 'assets' have been removed as these should not be set via <Application /> props.

  • Changed the component definition function to accept an options object, allowing for exclusion of specific props and defining an API name.
  • Updated multiple components to utilize the new options structure for better clarity and maintainability.
  • Adjusted the applyProps function to accept a more generic props type.

- Changed the component definition function to accept an options object, allowing for exclusion of specific props and defining an API name.
- Updated multiple components to utilize the new options structure for better clarity and maintainability.
- Adjusted the applyProps function to accept a more generic props type.
- Added 'gamepads', 'scene', 'scripts', and 'assets' to the list of excluded props in the Application component.
- Updated the corresponding exclude array to reflect these changes for improved prop management.
@marklundin marklundin self-assigned this Oct 28, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

🦋 Changeset detected

Latest commit: d5eab91

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@playcanvas/react Patch
@playcanvas/blocks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@playcanvas/blocks@279
npm i https://pkg.pr.new/@playcanvas/react@279

commit: d5eab91

@marklundin marklundin merged commit 131b07d into main Oct 30, 2025
11 checks passed
@marklundin marklundin deleted the fix-excluded-props branch October 30, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible regression: null props overwriting instance values (introduced in v0.10.3)

2 participants