February 2019
Beginner to intermediate
180 pages
4h 4m
English
CSSTransitionGroup will need the following props:
Since in is a reserved word in Reason, the convention is to use _in in Reason and have BuckleScript compile it to in for JavaScript using [@bs.as "in"].
BuckleScript provides [@bs.deriving abstract] for easily working with certain types of JavaScript objects. Instead of creating an object in JavaScript and binding to that object, we can create that object directly using BuckleScript:
[@bs.deriving abstract]type cssTransitionProps = { [@bs.as "in"] _in: bool, timeout: int, classNames: string,};
When using [@bs.deriving abstract], a helper function is automatically provided ...
Read now
Unlock full access