Today we will make a take a very swift walktrough of the ReasonReact
codebase. Our objective is understanding how to use a component
and how it is implemented.
Unfortunately the difference between the websites for ReasonML and
ReasonReact is not only the colour but the API description. On the
ReasonReact there is none.
We are gonna take a look at the
React module available in
componentSpec(_, stateless, _) a record type containing fields
that are used by the React runtime
the interesting bits are
render : (_self) => assert false,
initialState : () => (),
reducer : (_action, _state) => NoUpdate and are the one you should implement in your component
So what happens when we write a component?