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/[deleted] Mar 22 '16
Are there any examples of this? It seems more difficult than it sounds since you'd need to 'compile' the react code first to remove the JSX. The PureScript compiler seems picky about getting ES5 in FFI modules right now.