[ANN] Rescript-tea

Hi folks, we’ve updated the excellent bucklescript-tea for modern rescript, and released it as rescript-tea. See the release blog post for more details:

Would love any feedback, and happy to answer any questions.

15 Likes

Thank you Paul for reviving it! It’s a great alternative in the frontend space of ReScript, and with an extensive real world example to accompany it. :clap:

2 Likes

Great work! Also great to see that not everyone uses React in their ReScript projects.

PS.: I think having the dark-lang logo on the https://rescript-lang.org/ landing page would be nice.

2 Likes

I switched from my personal fork of bs-tea to this today. Everything works. So you have another production user.

Good to finally see a supported TEA implementation as well as a viable alternative to React in ReScript ecosystem.

1 Like

Good suggestion! Just made a PR

Anything in your fork to upstream?

Nope. Yours is a far more complete port. I put just enough work to make it work for my project.

Will contribute to darklang/rescript-tea directly from now on.

Nice, I’ve been waiting for this. Does it support JSX?

It seems like it should be possible to use it for views, but I haven’t used JSX, so I don’t know what would be involved. If you know how to make it work, happy to chat. Or if you figure it out, I’d be happy to accept a doc that explains how to do it. There’s an existing doc on integration with React (though it’s out of date: https://github.com/darklang/rescript-tea/blob/main/doc/integration_react-bs-tea.md).

1 Like

I wanted to use TEA but with the ability to use escape hatches.
This is a boon in that direction. Thank you!

I also wanted a CSS abstraction like elm-ui.
Is it possible to build something like it for rescript-tea?

1 Like

@moondaddi is it possible to integrate rescript-tea with new jsx ppx?

I don’t know much about TEA yet, but I think technically no problem to make the JSX ppx to support it.

@cristianoc @cknitt What do you think about making support JSX ppx to transform the jsx expressions to TEA?

EDIT:
Maybe the first peer of React in the jsx config?:

{
  "jsx": {
    "version": 4,
    "module": "tea",
  }
}
2 Likes