react-juce icon indicating copy to clipboard operation
react-juce copied to clipboard

Validate/Whitelist props on core component/view types

Open JoshMarler opened this issue 4 years ago • 1 comments

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 avatar Jan 03 '21 17:01 JoshMarler

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

JoshMarler avatar Mar 25 '21 16:03 JoshMarler