-
Notifications
You must be signed in to change notification settings - Fork 64
Example with Externally Defined React Component? #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just use
you will also need to define the type for props of that component e.g.
and now you can render it with
|
Thanks! I appreciate this. It helps a lot. One related issue I'm also trying to get my head around is passing in a callback as a prop. Is there a way to pass in a function that the ffiComponent will call to change the state that Purescript is maintaining? |
Sure:
You'd likely have something else than |
Would it be possible to get a simple example of how to render an externally defined React component from PureScript (e.g. a component imported through the FFI)?
The text was updated successfully, but these errors were encountered: