React

Introduction A couple of weeks ago Facebook presented React hooks, a new way of accessing React features inside functional components. In this blogpost I would like to show that the new hooks can easily be used in combination with Fable. Disclaimer: Hooks are an experimental proposal to React, currently available in 16.7 alpha, and the api is not final yet. Use at your own risk. useState() A first example of a hook is useState(). type SetState<'t> = 't -> unit let useState<'t> (t: 't) : ('t * SetState<'t>) = import "useState" "react" When…