r/purescript • u/r0ckf3lla • Apr 27 '20
React Native with PureScript?
Is writing React Native apps with PureScript possible? Is it supported?
7
Upvotes
r/purescript • u/r0ckf3lla • Apr 27 '20
Is writing React Native apps with PureScript possible? Is it supported?
5
u/Fraser92 Apr 28 '20
I'm currently building a react native app mostly in Purescript. I am using https://github.com/spicydonuts/purescript-react-basic-hooks and https://github.com/f-f/purescript-react-basic-native to build it and so far it has worked really well! I find myself having to wrap libraries fairly often but have gotten used to doing this fairly quickly and it hasn't been too big of a slow down. Feel free to let me know if you have any questions!
3
u/danielstaleiny Apr 27 '20
maybe this will be helpful to you. https://www.youtube.com/watch?v=_0fyjdUTI0w
3
u/[deleted] Apr 27 '20
Purescript produces Javascript code. You could do all javascript do. The only paintpoint is the binding. Hopefully, react-native’s binding already exists
https://github.com/doolse/purescript-reactnative
3
u/senorsmile Apr 27 '20
There are a few options I've heard of (not sure if all of them are still maintained):
- https://github.com/purescript-concur/purescript-concur-react
- https://github.com/paf31/purescript-thermite
There are also several other that don't use react directly, but provide alternative solutions:
- https://github.com/slamdata/purescript-halogen
- https://github.com/natefaubion/purescript-spork
- https://github.com/utkarshkukreti/purescript-hedwig
- https://github.com/easafe/purescript-flame
- https://github.com/ehrenmurdick/purescript-oak
1
u/srghma Apr 28 '20 edited Apr 30 '20
It's also possible to write in halogen
https://github.com/boxyoman/purescript-halogen-reactnative
But I want to make bindings to nativescript because:
Comparison https://github.com/srghma/purescript-learning-notes/blob/master/mobile-apps.md
0
u/[deleted] Apr 27 '20
[deleted] — view deleted comment