{"id":"faizdzn/ropinia","name":"ropinia","scope":"faizdzn","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.1","latest":"0.1.1","versions":["0.1.0","0.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"20e12ff4c884119ad2d3fbc43f7ab29c861e919de34dd6766078ba0d8fd06676","likes":0,"downloads":0,"install":"forest install faizdzn/ropinia","url":"https://forest.dev/p/roblox/faizdzn/ropinia","files":"https://api.forest.dev/ai/package/roblox/faizdzn/ropinia/files","readme":"<img src=\"images/logo_single.svg\" width=\"125px\">\n\n# RoPinia\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/roblox/react-lua/blob/main/LICENSE)\n[![CI](https://github.com/Faizdzn/ropinia/actions/workflows/ci.yml/badge.svg)](https://github.com/Faizdzn/ropinia/actions/workflows/ci.yml)\n[![Get it on Creator Store](images/link-creator-store.svg)](https://create.roblox.com/store/asset/)\n[![Wally (external link)](images/link-wally.svg)](https://wally.run/package/faizdzn/ropinia)\n\nA Pinia state management library ported into Roblox, bringing the simplicity and developer experience of Pinia to Roblox. If you're already familiar with Pinia, this library provides a familiar approach to creating stores, managing reactive state, and organizing application logic.\n\n## Example Usage\n`init.client.luau:`\n```lua\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\nlocal pinia = require(ReplicatedStorage.RoPinia)\n\n-- example of stores\nlocal myStore = pinia.store.defineStore(\"myStore\", {\n    state = function()\n        return {\n            hello = \"World\",\n            angka = 10\n        };\n    end,\n    getters = {\n        multipleAngka = function(state)\n            return state.angka.value * 2\n        end\n    },\n    actions = {\n        helloWorld = function(self)\n            print(`Hello {self.hello.value}`)\n        end,\n        sumWithN = function(self, n)\n            self.angka.value += n\n        end\n    }\n})\n\nprint(\"My Store\")\nprint(myStore)\nprint(myStore.angka.value)\nprint(myStore.multipleAngka.value)\n\nmyStore.sumWithN(1)\nmyStore.multipleAngka:recompute()\nprint(myStore.angka.value)\nprint(myStore.multipleAngka.value)\n\n```\n\nCheck our official examples in [./example](https://github.com/Faizdzn/ropinia/tree/main/example) (Rojo)\n\n## Contributors\n<a href=\"https://github.com/Faizdzn/ropinia/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=Faizdzn/ropinia\" />\n</a>\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## Donate\nIf RoPinia is useful to you, consider supporting its development! Your support helps us maintain the project, improve existing features, fix bugs, and continue building useful open-source tools for the community. Every contribution, whether it's a sponsorship, donation, or simply sharing the project, is greatly appreciated.\n\n[![Patreon](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F15749420&query=data.attributes.patron_count&suffix=%20Patrons&color=FF5441&label=Patreon&logo=Patreon&logoColor=FF5441&style=for-the-badge)](https://patreon.com/Faizdzn)","readmeTruncated":false}