{"id":"passhley/rodux","name":"rodux","scope":"passhley","platform":"roblox","description":"Port of the newest version of Rodux, has types!","version":"4.0.0-rc.0","latest":"4.0.0-rc.0","versions":["4.0.0-rc.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":"7914a339fb84c6b85aa5d37c4f68f2ccfb11bcd75f03e7fbea698b6d210b06a8","likes":0,"downloads":0,"install":"forest install passhley/rodux","url":"https://forest.dev/p/roblox/passhley/rodux","files":"https://api.forest.dev/ai/package/roblox/passhley/rodux/files","readme":"<h1 align=\"center\">Rodux</h1>\r\n<div align=\"center\">\r\n\t<a href=\"https://github.com/Roblox/rodux/actions\">\r\n\t\t<img src=\"https://github.com/Roblox/rodux/workflows/CI/badge.svg\" alt=\"GitHub Actions Build Status\" />\r\n\t</a>\r\n\t<a href=\"https://coveralls.io/github/Roblox/rodux?branch=master\">\r\n\t\t<img src=\"https://coveralls.io/repos/github/Roblox/rodux/badge.svg?branch=master\" alt=\"Coveralls Coverage\" />\r\n\t</a>\r\n\t<a href=\"https://roblox.github.io/rodux\">\r\n\t\t<img src=\"https://img.shields.io/badge/docs-website-green.svg\" alt=\"Documentation\" />\r\n\t</a>\r\n</div>\r\n\r\n<div align=\"center\">\r\n\tA state management library for Roblox Lua inspired by <a href=\"https://redux.js.org\">Redux</a>.\r\n</div>\r\n\r\n<div>&nbsp;</div>\r\n\r\n## Installation\r\n\r\n### Method 1: Model File (Roblox Studio)\r\n* Download the `rbxm` model file attached to the latest release from the [GitHub releases page](https://github.com/Roblox/rodux/releases).\r\n* Insert the model into Studio into a place like `ReplicatedStorage`\r\n\r\n### Method 2: Filesystem\r\n* Copy the `src` directory into your codebase\r\n* Rename the folder to `Rodux`\r\n* Use a plugin like [Rojo](https://github.com/LPGhatguy/rojo) to sync the files into a place\r\n\r\n## Usage\r\nRodux works just like [Redux](https://redux.js.org)'s base API.\r\n\r\nSee the official [Rodux Documentation](https://roblox.github.io/rodux/) for more details.\r\n\r\n```lua\r\nlocal Rodux = require(script.Parent.Rodux)\r\n\r\nlocal function reducer(state, action)\r\n\tstate = state or {\r\n\t\tfrobulations = 0,\r\n\t}\r\n\r\n\tif action.type == \"frobulate\" then\r\n\t\treturn {\r\n\t\t\tfrobulations = state.frobulations + 1,\r\n\t\t}\r\n\tend\r\n\r\n\treturn state\r\nend\r\n\r\nlocal store = Rodux.Store.new(reducer)\r\n\r\nstore:getState() -- { frobulations = 0 }\r\n\r\nstore:dispatch({\r\n\ttype = \"frobulate\",\r\n})\r\n\r\nstore:getState() -- { frobulations = 1 }\r\n```\r\n\r\n## Contributing\r\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for information.\r\n\r\n## License\r\nRodux is available under the Apache 2.0 license. See [LICENSE](LICENSE) for details.\r\n","readmeTruncated":false}