Skip to content

Commit c06147e

Browse files
committed
Adds simple decorators for creating stores and actions
1 parent dca4e7a commit c06147e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/utils/decorators.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export function createActions(alt) {
2+
return function (Actions, ...args) {
3+
return alt.createActions(Actions, {}, ...args)
4+
}
5+
}
6+
7+
export function createStore(alt) {
8+
return function (Store, ...args) {
9+
return alt.createStore(Store, undefined, ...args)
10+
}
11+
}

0 commit comments

Comments
 (0)