How do you mount a React-Lua component?

I want to make a React-Lua based UI, but the documentation is lacking on how to actually mount the components.

I can’t figure out how to actually mount the components, and haven’t found anything to help with this.

I’ve tried reading through DevForum posts and I can’t find anything.

1 Like

Not very experienced in Roact but here is my attempt at rescue

local handle = Roact.mount(
   Element Goes Here, -- Roact.createElement(...)
   Parent Goes Here, -- game.Players.LocalPlayer.PlayerGui
   Name of Object Goes Here -- "Super Cool UI"
)

https://roblox.github.io/roact/guide/components/
all the way at the bottom in this documentation

1 Like

That unfortunately doesn’t work :frowning:
The build of roact I’m using is the one that’s from Roact Documentation and GitHub - Roblox/react-lua: A comprehensive translation of upstream React 17.x into Lua. This is a read-only mirror

1 Like

https://roblox.github.io/roact-alignment/migrating-from-1x/convert-legacy-conventions/#mounting-updating-and-unmounting
And scroll a bit more down until you see Roact 17

I missed that, thanks for pointing that out!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.