File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ data StateUpdate props state action
181
181
type Self props state action =
182
182
{ props :: props
183
183
, state :: state
184
- , instance_ :: ReactComponentInstance
184
+ , instance_ :: ReactComponentInstance props state action
185
185
}
186
186
187
187
-- | Dispatch an `action` into the component to be handled by `update`.
@@ -408,12 +408,12 @@ foreign import displayNameFromSelf
408
408
-- | ```
409
409
-- |
410
410
-- | __*See also:* `element`, `toReactComponent`__
411
- data ReactComponent props
411
+ foreign import data ReactComponent :: Type -> Type
412
412
413
413
-- | An opaque representation of a React component's instance (`this` in the JavaScript
414
414
-- | React paradigm). It exists as an escape hatch to unsafe behavior. Use it with
415
415
-- | caution.
416
- data ReactComponentInstance
416
+ foreign import data ReactComponentInstance :: Type -> Type -> Type -> Type
417
417
418
418
-- | Convert a React-Basic `ComponentSpec` to a JavaScript-friendly React component.
419
419
-- | This function should only be used for JS interop and not normal React-Basic usage.
Original file line number Diff line number Diff line change @@ -93,15 +93,15 @@ foreign import unmountComponentAtNode_ :: EffectFn1 Element Boolean
93
93
-- | `React.Basic.DOM.Components.Ref` where possible__
94
94
-- |
95
95
-- | __*Note:* Relies on `ReactDOM.findDOMNode`__
96
- findDOMNode :: ReactComponentInstance -> Effect (Either Error Node )
96
+ findDOMNode :: forall props state action . ReactComponentInstance props state action -> Effect (Either Error Node )
97
97
findDOMNode instance_ = try do
98
98
node <- runEffectFn1 findDOMNode_ instance_
99
99
case toMaybe node of
100
100
Nothing -> throw " Node not found."
101
101
Just n -> pure n
102
102
103
103
-- | Warning: Relies on `ReactDOM.findDOMNode` which may throw exceptions
104
- foreign import findDOMNode_ :: EffectFn1 ReactComponentInstance (Nullable Node )
104
+ foreign import findDOMNode_ :: forall props state action . EffectFn1 ( ReactComponentInstance props state action ) (Nullable Node )
105
105
106
106
-- | Divert a render tree into a separate DOM node. The node's
107
107
-- | content will be overwritten and managed by React, similar
You can’t perform that action at this time.
0 commit comments