Appfairy-React
A patch on top of React for Appfairy/React apps.
With React
Component button = React { return <af-my-element-view> <af-proxy af-plug="button" ref=thisbutton history=thispropshistory onClick=thishandleClick /> </af-my-element-view> } { enativeEventorigin console } { return ReactDOM } AppfairyElement
With Appfairy-React
@ReactComponent button = React { return <af-my-element-view> <af-proxy af-plug="button" ref=thisbutton history=thispropshistory onClick=thishandleClick /> </af-my-element-view> } { enativeEvent console }
patch()
Rather than import appfairy-react
all the time, you can just use the patch()
method and then use react
as usual:
// main module AppfairyReact // any other module which uses jsx