React's fast refresh reruns statechart when a module that contains this call is edited.
As the statechart was already initialized, a config error was thrown since states and matches were already present in the current state.
To avoid throwing this error, it is now only thrown when the statechart is first initialized.
React's fast refresh reruns
statechart
when a module that contains this call is edited. As the statechart was already initialized, a config error was thrown sincestates
andmatches
were already present in the current state. To avoid throwing this error, it is now only thrown when the statechart is first initialized.