{"id":"notmirrox/pretty-react-hooks","name":"pretty-react-hooks","scope":"notmirrox","platform":"roblox","description":"A collection of useful hooks for React","version":"0.1.1","latest":"0.1.1","versions":["0.1.0","0.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"howmanysmall/typed-promise":{"version":"^4.0.6","alias":"Promise"},"jsdotlua/react":{"version":"^17.2.1","alias":"React"}},"integrity":"022bf49fd8b6bc358aec65b299ebfd06a1ae5c9ef8b4586666c9276e1a93eda0","likes":0,"downloads":0,"install":"forest install notmirrox/pretty-react-hooks","url":"https://forest.dev/p/roblox/notmirrox/pretty-react-hooks","files":"https://api.forest.dev/ai/package/roblox/notmirrox/pretty-react-hooks/files","readme":"## 🌺 [pretty-react-hooks-luau](https://wally.run/package/notmirrox/pretty-react-hooks)\n\n[![GitHub license](https://img.shields.io/github/license/NotMirrox/pretty-react-hooks-luau?style=for-the-badge)](LICENSE.md)\n\nAn opinionated collection of useful hooks and utilities for [React](https://github.com/jsdotlua/react-lua) on Roblox, ported to **Luau**.\n\nThis is a Luau port of [littensy/pretty-react-hooks](https://github.com/littensy/pretty-react-hooks) (originally written for [roblox-ts](https://roblox-ts.com)). If you are on roblox-ts, use the original `@rbxts/pretty-react-hooks` package.\n\nIf you find a bug or have a feature request, please [open an issue](https://github.com/NotMirrox/pretty-react-hooks-luau/issues/new/).\n\n&nbsp;\n\n## 📦 Installation\n\nThis package is published to [Wally](https://wally.run). Add it to your `wally.toml`:\n\n```toml\n[dependencies]\nPrettyReactHooks = \"notmirrox/pretty-react-hooks@0.1.0\"\n```\n\nThen run:\n\n```sh\nwally install\n```\n\nWally packages are also consumable from [pesde](https://pesde.dev) via its wally compatibility index, so you can depend on this package from either toolchain.\n\n&nbsp;\n\n## 📊 Port Status\n\n**✅ Ported:** [`useAsync`](src/use-async/), [`useAsyncCallback`](src/use-async-callback/), [`useAsyncEffect`](src/use-async-effect/), [`useBindingListener`](src/use-binding-listener/), [`useBindingState`](src/use-binding-state/), [`useCamera`](src/use-camera/), [`useComposedRef`](src/use-composed-ref/), [`useDebounceCallback`](src/use-debounce-callback/), [`useDebounceEffect`](src/use-debounce-effect/), [`useDebounceState`](src/use-debounce-state/), [`useDeferCallback`](src/use-defer-callback/), [`useDeferEffect`](src/use-defer-effect/), [`useDeferState`](src/use-defer-state/), [`useEventListener`](src/use-event-listener/), [`useInterval`](src/use-interval/), [`useKeyPress`](src/use-key-press/), [`useLatest`](src/use-latest/), [`useLatestCallback`](src/use-latest-callback/), [`useLifetime`](src/use-lifetime/), [`useMountEffect`](src/use-mount-effect/), [`useMouse`](src/use-mouse/), [`usePrevious`](src/use-previous/), [`useTagged`](src/use-tagged/), [`useThrottleCallback`](src/use-throttle-callback/), [`useThrottleEffect`](src/use-throttle-effect/), [`useThrottleState`](src/use-throttle-state/), [`useTimeout`](src/use-timeout/), [`useTimer`](src/use-timer/), [`useUnmountEffect`](src/use-unmount-effect/), [`useUpdate`](src/use-update/), [`useUpdateEffect`](src/use-update-effect/), [`useViewport`](src/use-viewport/), [`binding`](src/utils/binding.luau) util.\n\n**⏳ Pending:** `hoarcekat` util.\n\n**🚫 Skipped:** `useMotion`, `useSpring` — use [`react-ripple`](https://github.com/littensy/ripple/tree/main/packages/react-ripple) instead.\n\n&nbsp;\n\n## 🌻 Contributing\n\nContributions are welcome. If you change a hook, update its tests and documentation as well.\n\nTo get started:\n\n1. Install the toolchain with [Rokit](https://github.com/rojo-rbx/rokit):\n   ```sh\n   rokit install\n   ```\n   This installs `rojo`, `wally`, `wally-package-types`, `selene`, and `stylua` at the versions pinned in [`rokit.toml`](rokit.toml).\n2. Install dependencies and inject Luau types into the resolved packages:\n   ```sh\n   wally install\n   wally-package-types --sourcemap sourcemap.json Packages\n   wally-package-types --sourcemap sourcemap.json DevPackages\n   ```\n   Regenerate `sourcemap.json` with `rojo sourcemap default.project.json -o sourcemap.json` whenever the project structure changes.\n3. Lint and format:\n   ```sh\n   selene src\n   stylua src\n   ```\n4. Serve the project to Roblox Studio:\n   ```sh\n   rojo serve\n   ```\n5. Run tests with [TestEZ](https://github.com/Roblox/testez). The recommended workflow is the [TestEZ Companion](https://marketplace.visualstudio.com/items?itemName=tacheometrist.testez-companion) VS Code extension, which discovers and runs `*.spec.luau` files inside Roblox Studio while `rojo serve` is connected.\n\nRecommended VS Code extensions:\n\n-   [Rojo](https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo)\n-   [Luau Language Server](https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp)\n-   [StyLua](https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.stylua)\n-   [Selene](https://marketplace.visualstudio.com/items?itemName=Kampfkarren.selene-vscode)\n-   [TestEZ Companion](https://marketplace.visualstudio.com/items?itemName=tacheometrist.testez-companion)\n\n&nbsp;\n\n## 🙏 Credits\n\nOriginally created by [@littensy](https://github.com/littensy) as [pretty-react-hooks](https://github.com/littensy/pretty-react-hooks) for roblox-ts. Ported to native Luau by [@NotMirrox](https://github.com/NotMirrox).\n\n&nbsp;\n\n## 📝 License\n\npretty-react-hooks-luau is licensed under the [MIT License](LICENSE.md).\n","readmeTruncated":false}