I'm new to using state machines and im still getting used to them.
Should I move things like this into a some sort of toggle action?
Or is it fine like this?
const togglePlay = () => {
if (editorState.matches("Playing")) {
editorActorRef.send({ type: "pause" })
return
}
editorActorRef.send({ type: "play" })
}