Replies: 8 comments 8 replies
-
Well it's only the JSX that is transpiled. And it is a very custom compilation. One that I suspect would not be supported by ReasonML, but I'm not 100% on that. The way it works cannot be reduced into simple function calls and I morph not just the elements but the attributes as well. That being said I do have support for HyperScript. It doesn't leverage most of the benefits of the JSX compiler but it does have the advantage here of boiling down to a simple I have no knowledge of ReasonML and not being able to leverage the custom transforms definitely would dampen my personal enthusiasm. But it definitely isn't off the table. I'm not aware of anyone working on this as of yet. For someone who knows ReasonML I think a simple integration would not be too difficult and I'd be willing to help answer any questions to help make it posssible. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much @ryansolid
That's very good to know, if only the jsx code is transpiled, it means compiling OCaml/ReasonML to JS and preserving the jsx could work. I might give it a try soon. I think I read somewhere it was doable, but I couldn't find the documentation (yet). I will give it a try as soon as possible, and try to report here if I can make it work somehow 😄 |
Beta Was this translation helpful? Give feedback.
-
Something like Solid or Svelte for ReasonML would be fantastic! :) @gaku-sei: as far as I remember, you just can embed JavaScript into Reason. But I'm not sure if Reason would allow JSX there. Even if it does, however, JSX isn't valid JavaScript, so you'd have to compile the output from Reason to JavaScript (so basically, there would three compile phases with Solid, which probably isn't great). The easiest approach probably would be to just put Solid code into a separate @ryansolid: You should have look at ReasonML/OCaml. I think it's a fantastic language (in many ways better than TypeScript). I would be astonished if you don't like ReasonML/OCaml, to be honest. |
Beta Was this translation helpful? Give feedback.
-
After trying a bit yesterday, i could make this Gist and it partly works: https://gist.github.com/gaku-sei/8e1d157682379d2bafc4b6dc4e080091 So far, here are some things I noticed:
|
Beta Was this translation helpful? Give feedback.
-
Well that's good. HyperScript means you need to wrap expressions in functions yourself but otherwise should work. This is pretty exciting. There is definitely some interest here, I've just do not have experience with ReasonML. I have some HyperScript examples.. There is a TodoList example in the examples section. See it here: https://codesandbox.io/s/0vmjlmq94v |
Beta Was this translation helpful? Give feedback.
-
I commented in that related ReScript issue (rescript-lang/rescript-compiler#4783) but just wanted to voice my interest for this in the Solid community as well. I'd love to be able to use Solid + ReScript in my projects 👍 |
Beta Was this translation helpful? Give feedback.
-
I wanted to try solid for some time now and since I'm using rescript on a daily basis I tried to build upon @gaku-sei 's previous efforts. A lot more work needs to be done to tune the api and cover the most important parts of solid's api surface with bindings. But it's a start. If anyone has some idea or criticism to share regarding my approach for bindings, please feel free to create a separate issue in the bindings repo. |
Beta Was this translation helpful? Give feedback.
-
I really love this framework and plan to use it for some middle sized project, but using TypeScript is a bit of a letdown to me 😞
Is there any (planned) support for Flow lang or ReasonML (official or unofficial)?
It feels like ReasonML could be supported somehow but I wonder how some features, like currying, would work with the Solid "transpiler" 😕
Beta Was this translation helpful? Give feedback.
All reactions