UNPKG
@sgnl-pro/react-tree
Version:
latest (0.3.0)
0.3.0
0.2.0
0.1.4
0.1.3
0.1.2
A tree view component for React
@sgnl-pro/react-tree
/
src
/
context
/
useTreeState.ts
8 lines
(6 loc)
•
221 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
import
{ useContext }
from
'react'
;
import
{ treeStateContext }
from
'./treeContext'
;
import
{
ITreeState
}
from
'./treeReducer'
;
export
const
useTreeState = ():
ITreeState
=>
{
return
useContext
(treeStateContext); };