Closed
Description
The current definition of Self
allows for actions of any type to be dispatched in some cases, what may cause runtime errors:
type Self props state action = { props :: props , state :: state , instance_ :: ReactComponentInstance }
This happens because action
does not exist in the body of Self
. A possible solution is to either newtype
it (breaking change), or change it to:
type Self props state action = { props :: props , state :: state , instance_ :: ReactComponentInstance , action :: Proxy action }