DEV Community

Discussion on: ReasonML for production React Apps? 🤔 (Part 1)

Collapse
 
mrjbj profile image
mrjbj

If you're following the article "step-by-step", add a default event handler for onClick in the Button.re file as per below:


/* Button.re */
...
let make = (
~onClick = _ => (), // <-- this is needed
~title: string,
~children: ReasonReact.reactElement,
~disabled: false,
~category=SECONDARY,
)
...