File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ exports.writeRef_ = function(ref, a) {
4848
4949exports . useContext_ = React . useContext ;
5050
51- exports . createContext_ = React . createContext ;
51+ exports . createContext = React . createContext ;
5252
5353exports . contextProvider_ = function ( context ) {
5454 return context . Provider ;
Original file line number Diff line number Diff line change @@ -170,8 +170,7 @@ foreign import data Context :: Type -> Type
170170useContext :: forall a . Context a -> Hook (UseContext a ) (Maybe a )
171171useContext context = Render (map toMaybe (runEffectFn1 useContext_ context))
172172
173- createContext :: forall a . a -> Effect (Context a )
174- createContext = runEffectFn1 createContext_
173+ foreign import createContext :: forall a . Effect (Context a )
175174
176175contextProvider :: forall a . Context a -> a -> JSX -> JSX
177176contextProvider context a child = element (contextProvider_ context) { value: a, children: child }
@@ -324,12 +323,6 @@ foreign import useContext_
324323 (Context a )
325324 (Nullable a )
326325
327- foreign import createContext_
328- :: forall a
329- . EffectFn1
330- a
331- (Context a )
332-
333326foreign import contextProvider_
334327 :: forall a
335328 . Context a
You can’t perform that action at this time.
0 commit comments