February 2019
Beginner to intermediate
180 pages
4h 4m
English
Next, we create the components' required make functions. This is where we use the ReasonReact.wrapJsForReason helper function.
For TransitionGroup, we won't need any props. Since the ~props argument is required, we pass Js.Obj.empty(). The ~reactClass argument is passed the external binding we created in the previous step:
module TransitionGroup = { let make = children => ReasonReact.wrapJsForReason( ~reactClass=transitionGroup, ~props=Js.Obj.empty(), children, );};
Now, ReactTransitionGroup.TransitionGroup is a ReasonReact component that can be used in our app.
Read now
Unlock full access