react-lua
react-lua copied to clipboard
A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into Lua.
Please make it more clear if this is for Roblox's Luau or [Lua](https://www.lua.org/).
This will allow attributes to be applied to instances. While I've not had a need for this myself, there's others who have and I think it'd be an appropriate addition...
Closes #38 I do **NOT** intend for this to be merged, it's just for illustrating the proposed changes. No tests written as I'm unsure on the testing approach in this...
React 19 allows simply passing `ref` as a prop; forwardRef overcomplicates things. See: * https://react.dev/reference/react/forwardRef * https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop
See https://github.com/jsdotlua/react-lua/blob/df4b4072e3aa78fc64850f8ca8b696084f305d75/modules/react-reconciler/src/RobloxReactProfiling.luau for source
References: - #41 Checklist before submitting: * [ ] Added/updated relevant tests * [ ] Added/updated documentation - https://github.com/jsdotlua/react-lua/pull/41#issuecomment-2746027950
When declaring an Instance with `createElement` and the following conditions are met, React Lua assigns a `key` prop to a table of children, which triggers a `createTextInstance` error: 1. `false`...
Removes update from queue when calling setState with equal value as current state. This would previously cause queue buildup until the next rerender.
I'm only able to get devtools to run (with rojo translating ../utils to `script.Parent.Parent:WaitForChild('utils')` if I change this in react-devtools-shared/src/backend/renderer.luau : ```lua #ocal utils = require(script.Parent:WaitForChild('utils')) # does not work...