Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _G.createElement(class, properties, children)
- return {
- ["Class"] = class,
- ["Children"] = children,
- ["Properties"] = properties
- }
- end
- function _G.mount(element, parent)
- local instance = Instance.new(element.Class, parent)
- for name, value in pairs(element.Properties) do
- instance[name] = value
- end
- for _, child in pairs(element.Children) do
- _G.mount(child, instance)
- end
- return instance
- end
- _G.Roact = {["createElement"] = _G.createElement, ["mount"] = _G.mount}
Advertisement
Add Comment
Please, Sign In to add comment