state-designer
state-designer copied to clipboard
Using wrong method name in a Sandbox example
Hi Stev,
In the tip box of this link, there's a Sandbox example where it has the following lines which are not correct:
import { createStateDesigner, useStateDesigner } from "@state-designer/react"
// [1]
const counter = createStateDesigner({
data: { count: 0 },
on: { CLICKED: data => data.count++ },
})
I suggest replacing them with the following lines so the example would work:
import { useStateDesigner } from "@state-designer/react"
import { createState } from "@state-designer/core"
// [1]
const counter = createState({
data: { count: 0 },
on: { CLICKED: data => data.count++ },
})
P.S. I would like to thank you so much for your packages and for your creativity <3