Regretting/Questioning my current stack Flutter + Elixir as solo dev for mobile app

I have not seen this mentioned above:

Use react native with some way to share code between JS runtime and backend.

Because personally I think JS and TS are solid as shredded salad I did some research on typed languages that compile to JS but provide strong guarantees of error free code.

I looked at Haskell + Purescript, Ocaml + Reason/Rescript but in the end I decided to give Gleam a go. It is less obscure than Haskell and in better community shape then Reason/Rescript. Aaand I could share gleam code with an elixir backend.

I only started, and now have a react native app with main engine written in gleam and compiled to JS. The views are written in JSX and have minimum logic (I try to put it in custom hooks)
I hope to post a longer write up on how it’s going, so far I have hit two issues:

  • gleam allows only lowercase function names and stupid react rules require hook names to follow useSomeHoook convention. A workaround is to ‘export {use_foo as useFoo} from …’
  • gleam list is hard to use on JS side; requires converting. Array is not a first class citizen on gleam side- not sure yet how to deal with this and which types should be used in gleam app engine interface.
3 Likes