June 20th, 2024

React Lua

The GitHub repository focuses on translating ReactJS 17.x into Lua for Roblox and Lua community. It aims for performance and accuracy, welcoming contributions from notable developers like Paul Doyle and Matt Hargett.

Read original articleLink Icon
React Lua

The GitHub repository at the provided URL pertains to the "React Lua" project, which involves translating ReactJS 17.x into Lua. This translation aims for high performance and accuracy, aligning with the original ReactJS versions. Targeted at the Roblox and wider Lua community, the project is a fork of `roblox/react-lua` and encourages community contributions. Notable project contributors include Paul Doyle, Matt Hargett, and Max Mines. The repository contains packages like `react`, `react-debug-tools`, and `react-test-renderer`, along with guidelines for contributions and deviations from Roact. For further details, the repository can be accessed at the provided GitHub link.

Link Icon 17 comments
By @_xivi - 5 months
Some background for anyone interested: The project is a fork of `roblox/react-lua` to basically open it up for community engagement and it uses Luau

Roblox's Luau: https://luau-lang.org/

> Luau is a fast, small, safe, gradually typed embeddable scripting language derived from Lua.

> Around 2006, Roblox started using Lua 5.1 as a scripting language for games. Over the years the runtime had to be tweaked to provide a safe, secure sandboxed environment; we gradually started accumulating small library changes and tweaks.

By @oDot - 5 months
I wrote Vleam[0], which is the equivalent to this, but for Vue and Gleam.

The more options like this, the better. Especially for existing ecosystems.

[0] https://github.com/vleam/vleam

By @xrd - 5 months
As others here have mentioned, why React?

More specifically, I know that Roblox uses lua(u) but I assumed this was all for scripting. React is a tool for building UI.

How do you use React inside Roblox? You can build UI? I'm trying to wrap my head around my clearly mistaken assumption that what was possible in Roblox was writing lua-ish scripts that handle events in Roblox and then alter the game flow. That's very different from a full UI element that manages state and presentation, which is why React was so exciting (ten years ago).

By @firtoz - 5 months
You could write react in Lua for a while, for example for Roblox. And, it's very cool. There's also another project that compiles typescript to Lua: https://roblox-ts.com

And that one supports writing pretty much actual React tsx but with Roblox primitives.

One of my clients asked me to make a Roblox plugin, it was my first time, and I was very pleasantly surprised with this workflow. There are also tools to enable really high iteration speed. It felt nicer than Unity at some moments. I didn't really need to write or know any Lua at all!

By @pull_my_finger - 5 months
I'm reading the docs and it's very unclear if this project is for Lua or Luau (the Roblox derivative).
By @classified - 5 months
Ancient quiche eater wisdom has it that you can write Fortran in any language. In that vein, React in Lua is not too much of a surprise.
By @bilekas - 5 months
Looking at it's parity list its missing quite a lot, that's not the issue as this seems to be a for fun project (or masochism) but at what point is it considered react? It's unclear to me.
By @DonHopkins - 5 months
I bet they exploited child labor to develop it.

https://www.youtube.com/watch?v=n6PYj93SGxc

By @hk-hater420 - 5 months
This is unholy and cursed
By @h1fra - 5 months
Another library/documentation that commits the sin of not showing any examples
By @probablyfiction - 5 months
I don't even like writing React in Javascript
By @snshn - 5 months
React has terrible performance
By @reactworld - 5 months
React is eating the world