Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate/Whitelist props on core component/view types #200

Open
JoshMarler opened this issue Jan 3, 2021 · 1 comment
Open

Validate/Whitelist props on core component/view types #200

JoshMarler opened this issue Jan 3, 2021 · 1 comment
Assignees

Comments

@JoshMarler
Copy link
Owner

We should ad prop whitelisting/validation in BlueprintBackend.setProperty: https://github.com/nick-thompson/blueprint/blob/master/packages/react-juce/src/lib/BlueprintBackend.ts#L149

This would help us to avoid sending unnecessary props through to native. If a prop is set that is not recognised by the ViewInstance type we should avoid calling through to __BlueprintNative__.setViewProperty.

This is motivated after hitting a bug in which passing through a mobx-state-tree model as a prop caused Duktape/EcmascriptEngine to fall over (likely due to some sort of object cycle).

@JoshMarler JoshMarler self-assigned this Jan 3, 2021
@JoshMarler
Copy link
Owner Author

Adding performance label to this as it's likely to have a significant impact.

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

No branches or pull requests

1 participant