File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 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
181181type Self props state action =
182182 { props :: props
183183 , state :: state
184- , instance_ :: ReactComponentInstance
184+ , instance_ :: ReactComponentInstance props state action
185185 }
186186
187187-- | Dispatch an `action` into the component to be handled by `update`.
@@ -408,12 +408,12 @@ foreign import displayNameFromSelf
408408-- | ```
409409-- |
410410-- | __*See also:* `element`, `toReactComponent`__
411- data ReactComponent props
411+ foreign import data ReactComponent :: Type -> Type
412412
413413-- | An opaque representation of a React component's instance (`this` in the JavaScript
414414-- | React paradigm). It exists as an escape hatch to unsafe behavior. Use it with
415415-- | caution.
416- data ReactComponentInstance
416+ foreign import data ReactComponentInstance :: Type -> Type -> Type -> Type
417417
418418-- | Convert a React-Basic `ComponentSpec` to a JavaScript-friendly React component.
419419-- | 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
9393-- | `React.Basic.DOM.Components.Ref` where possible__
9494-- |
9595-- | __*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 )
9797findDOMNode instance_ = try do
9898 node <- runEffectFn1 findDOMNode_ instance_
9999 case toMaybe node of
100100 Nothing -> throw " Node not found."
101101 Just n -> pure n
102102
103103-- | 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 )
105105
106106-- | Divert a render tree into a separate DOM node. The node's
107107-- | content will be overwritten and managed by React, similar
You can’t perform that action at this time.
0 commit comments