Skip to content

Commit 381c818

Browse files
committed
Create an element from a redux class with no store
1 parent 8d1278b commit 381c818

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/React/Redux.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module React.Redux
88
, Store
99
, createClass
1010
, createElement
11+
, createElement'
1112
, createStore
1213
, createStore'
1314
, reducerOptic
@@ -125,6 +126,9 @@ createElement store reduxClass = React.createElement providerClass { store: stor
125126
reduxEl :: React.ReactElement
126127
reduxEl = React.createElement (unsafeCoerce reduxClass) (unsafeCoerce unit) []
127128

129+
createElement' :: forall props state'. ReduxReactClass state' props -> React.ReactElement
130+
createElement' reduxClass = React.createElement (unsafeCoerce reduxClass) (unsafeCoerce unit) []
131+
128132
createStore :: forall eff action state. Reducer action state -> state -> Eff (Effects eff) (Store action state)
129133
createStore reducer state = createStore' reducer state id
130134

0 commit comments

Comments
 (0)