From a9117052f3857be18c5845cee0092ce42c4f0ac1 Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Wed, 30 Aug 2023 13:34:33 -0700 Subject: [PATCH] Add some useful specifics --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 22db413c..974d0f70 100644 --- a/README.md +++ b/README.md @@ -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.