EcmascriptEngine::registerNativeProperty
and EcmascriptEngine::registerNativeMethod
. These methods will install the given values on either the global
object, or named object of your choosing.EcmascriptEngine::registerNativeMethod
or by assigning a value to a named object accessible from the global object, and looking that value up or invoking it on the C++ side with EcmascriptEngine::evaluateInline
or EcmascriptEngine::invoke
.reactjuce::View
, and override the necessary methods. Basically, a reactjuce::View
is just a juce::Component
with some extra goodies.ReactApplicationRoot::registerViewType
:MyCoolView
!React.createElement("MyCoolView", props, children);
, but you rarely see that because people are used to using JSX and writing <MyCoolView {...props}>
. If you want to use JSX like that you have to make this little wrapper to abstract over the dynamic string argument: