UNPKG
react-robot
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.0
1.0.0
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
React hooks for Robot finite state machines
github.com/matthewp/react-robot
matthewp/react-robot
react-robot
/
index.d.ts
12 lines
(11 loc)
•
294 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
declare
module
'react-robot'
{
import
type
{
Machine
,
SendFunction
,
Service
}
from
'robot3'
;
export
function
useMachine<M
extends
Machine
>(
machine
: M,
initialContext
?: M[
'context'
] ): [ M[
'state'
] & {
context
: M[
'context'
]},
SendFunction
,
Service
<
typeof
machine> ]; }