r/purescript • u/drekwageslave • Mar 22 '16
Using JSX React components in Purescript
Hi,
I started learning Purescript and I like the language a lot, the bindings purescript-react and purescript-thermite are really nice.
What I cannot figure out is if it is possible to integrate React components written in JSX into a purescript-react/purescript-thermite project?
In other words I download some React component from GitHub/npm which is written in JSX and I want to use it as a child component of my Purescript-React component. Is it possible? If yes how? I was trying to figure it out on my own and search on the Internet but I didn't find anything ...
Thanks!!
View all comments
Show parent comment
1
u/drekwageslave Mar 22 '16
I was unable to find any example, on GitHub or elsewhere (perhaps I missed something), when JSX is compiled one gets a lot of generated code and it's difficult to know what the next step for calling the component should be. FFI in Purescript is awesome, the problem is I am not sure what to call in the generated code from Purecript in order to integrate the component into my purescript code.