{"id":"firere/roact","name":"roact","scope":"firere","platform":"roblox","description":"Mirrored from the Wally registry.","version":"1.5.0","latest":"1.5.0","versions":["1.5.0"],"license":"Apache-2.0","licenseRating":"safe","licenseCaveats":["Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved."],"licenseVerified":true,"dependencies":{},"integrity":"71e942cd88058b51edeedff078417606f20d6f5f50575d22ac67461112b2c58c","likes":0,"downloads":0,"install":"forest install firere/roact","url":"https://forest.dev/p/roblox/firere/roact","files":"https://api.forest.dev/ai/package/roblox/firere/roact/files","readme":"<h1 align=\"center\">Roact</h1>\n<div align=\"center\">\n\t<a href=\"https://firere.github.io/roact\"><img src=\"https://img.shields.io/badge/docs-website-green.svg\" alt=\"Documentation\" />\n</div>\n\n<div align=\"center\">\n\tAn extension of [Roblox's Roact](https://github.com/Roblox/roact)\n</div>\n\n<div>&nbsp;</div>\n\n## Installation\n\n### Method 1: Filesystem\n* Copy the `src` directory into your codebase\n* Rename the folder to `Roact`\n* Use a plugin like [Rojo](https://github.com/rojo-rbx/rojo) to sync the files into a place\n\n### Method 2: Wally\n* Add [Wally](https://wally.run) to your project\n* Add `firere/roact` to your `dependencies` in `wally.toml`\n\n## What's the difference?\n* Whenever a prop is passed into a host component which is not a valid property of the target Roblox class, it does not error and simply skips over trying to apply it\n* Whenever children are passed in both the `Roact.Children` key of `props` *and* in the `children` arguments of `createElement`, it will automatically merge them both\n\t* If 2 keys with the same name are found in both arguments, the `children` argument will replace the one in `props`; this can be configured\n\n## [Documentation](https://firere.github.io/roact)\nFor a detailed guide and examples, check out the [documentation](https://firere.github.io/roact).\n\n```lua\nlocal LocalPlayer = game:GetService(\"Players\").LocalPlayer\n\nlocal Roact = require(Roact)\n\n-- Create our virtual tree describing a full-screen text label.\nlocal tree = Roact.createElement(\"ScreenGui\", {\n\t[Roact.Children] = {\n\t\tImage = Roact.createElement(\"ImageLabel\", {\n\t\t\tInvalidProp = \"InvalidProp is not a valid property on the ImageLabel class\" -- This does not produce an error.\n\t\t})\n\t}\n}, {\n\tLabel = Roact.createElement(\"TextLabel\", { -- Both Image and Label will be children of tree.\n\t\tText = \"Hello, world!\",\n\t\tSize = UDim2.new(1, 0, 1, 0),\n\t}),\n})\n\n-- Turn our virtual tree into real instances and put them in PlayerGui\nRoact.mount(tree, LocalPlayer.PlayerGui, \"HelloWorld\")\n```\n\n## License\nRoact is available under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt) for details.","readmeTruncated":false}