You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So in reactComponent, what is the equivalent of the foreign-props-to-Purescript-props function ({ | jsProps } -> props) which was an argument to toReactComponent?
The text was updated successfully, but these errors were encountered:
It has to do with requiring props to be an object. JS React requires this, but React.Basic.Classic.Component/ComponentSpec/make and React.Basic.Hooks.component do not. With React.Basic.Hooks.reactComponent/reactComponentWithChildren you're already interacting directly with JS React components and the object requirement is already there.
https://github.com/lumihq/purescript-react-basic/blob/d8087ade742a7070e35bbd999f45e373551c716d/src/React/Basic.purs#L70-L71
I have a question about
toReactComponent
.I see it has moved to
React.Basic.Classic
, but it's still referenced here inReact.Basic
(and this documentation is re-exported inReact.Basic.Hooks
).https://github.com/lumihq/purescript-react-basic-classic/blob/e0c21d61a92f36ff1f12fe972fb88d65e48cd927/src/React/Basic/Classic.purs#L280
It seems like for React FFI with Hooks
toReactComponent
has been replaced byreactComponent
(and family) instead, right?https://github.com/spicydonuts/purescript-react-basic-hooks/blob/5e43ca349a960c238e88219d0121603ae0c9889b/src/React/Basic/Hooks.purs#L88
So in
reactComponent
, what is the equivalent of the foreign-props-to-Purescript-props function({ | jsProps } -> props)
which was an argument totoReactComponent
?The text was updated successfully, but these errors were encountered: