BetterErrors
BetterErrors copied to clipboard
state type defined after component gives state type escape scope error
Solution: first define type state then declare component
Basically, createComponent returns something of type
component 'state
for a not yet defined 'state. Then state gets defined later and you get the error message.