Skip to content

Add some useful specifics #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@

---

`react-lua` is a 1:1 translation of upstream [React](https://github.com/facebook/react), and is highly-turned for both performance and correctness.
`react-lua` is a 1:1 translation of upstream [React](https://github.com/facebook/react) from JavaScript into Lua, and is highly-turned for both performance and correctness.
When possible, upstream flowtype and definitely-typed types have been translated into Luau type annotations. The major and minor version of React Lua is aligned to the upstream used for the translation, except where noted. Due to the close nature of the two implementations, most article, video, or blog post that gives React JS advice can be applied to `react-lua` -- modulo language differences, of course.

Some experimental React JS 17 features, that are removed in React JS 18 and are not implemented in `react-lua`:
* Blocks
* SuspenseList
* FundamentalComponent
* `createEventHandle` API

Some React JS 17 features not yet translated in `react-lua`:
* Server Components
* (De)Hydration
* Persistence
* The `supportsMutation = false` option in the ReactHostConfig
* ScopeComponent
* some specific `Text` behavior not needed by the currently ported renderers

If you'd like to help port some of the missing features, search for `unimplemented` in the code.

While `react-lua` is written in the Luau dialect, bundler tools such as [DarkLua](https://darklua.com/) can be used to transpile the implementation code to Lua code that is compatible with other Lua-based runtimes. Note that other Lua runtimes may need a new renderer implementation to be created, a [reference](packages/react-roblox) renderer based on the [React Native](https://github.com/facebook/react/tree/main/packages/react-native-renderer) renderer is included in this repository.

TODO: Write the rest of the README.