VSeed, an elegant data composer, transforming complexity into simplicity.
!!!###!!!title=jsx config——VisActor/VRender tutorial documents!!!###!!!!!!###!!!description=VRender supports creating scene tree using JSX syntax. If you want to use this mode, please follow the steps below to check your environment:!!!###!!!
JSX Support
VRender supports creating scene tree using JSX syntax. If you want to use this mode, please follow the steps below to check your environment:
Environment Configuration
If you are using JSX syntax to describe scene tree nodes in a react project, you need to wrap VRender's jsx with a conversion function to convert react's virtual nodes into VRender's scene tree nodes.
The graphic elements using jsx syntax all start with V, and accept an attribute property. The parameters of this attribute property refer to the configuration document, supporting name, id, and stateProxy configurations, which will be set to the graphic element in the end. The event naming is different, and the event map is as follows: