- Notifications
You must be signed in to change notification settings - Fork 144
Description
Introduction
Today, we can't pass custom property to any React Native Component like View, Image. And if we do that, React Native will throw errors.
Details
There are 3 primary situations we need this feature:
-
We are building a debug tool like React Developer Tools, so we need a custom protocol/property to display/design the interaction/information with the debug tool.
-
We are commutating/transferring data with the native(Android/iOS) , so we need a way to define and transfer the data on the component instance.
-
We are traversing the fiber tree and do something like track/report events to the server, so we need a way to get the data.
Discussion points
Like Web/DOM, it provides a way(data-xxx) to define your custom property and React supports that naturally. But in React Native, there is no way like that. I hope we can support it too, thanks.