UNPKG
darian
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
A Naive state container for JavaScript apps
github.com/Casper-MAGI/Darian
Casper-MAGI/Darian
darian
/
src
/
createStore.ts
12 lines
(9 loc)
•
262 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
Store
from
"./Store"
;
import
{ actionT, reducerT, reduceTreeT }
from
"./type"
;
const
createStore
= (
reducer: reducerT, action?: actionT
) => {
return
new
Store
( reducer, action || {
type
:
"init"
}, ); };
export
default
createStore;