Forest Logo
search
package_2

pretty-react-hooks

By @notmirrox

Roblox

Mirrored

🌺 pretty-react-hooks-luau

GitHub license

An opinionated collection of useful hooks and utilities for React on Roblox, ported to Luau.

This is a Luau port of littensy/pretty-react-hooks (originally written for roblox-ts). If you are on roblox-ts, use the original @rbxts/pretty-react-hooks package.

If you find a bug or have a feature request, please open an issue.

 

📦 Installation

This package is published to Wally. Add it to your wally.toml:

[dependencies]
PrettyReactHooks = "notmirrox/pretty-react-hooks@0.1.0"

Then run:

wally install

Wally packages are also consumable from pesde via its wally compatibility index, so you can depend on this package from either toolchain.

 

📊 Port Status

✅ Ported: useAsync, useAsyncCallback, useAsyncEffect, useBindingListener, useBindingState, useCamera, useComposedRef, useDebounceCallback, useDebounceEffect, useDebounceState, useDeferCallback, useDeferEffect, useDeferState, useEventListener, useInterval, useKeyPress, useLatest, useLatestCallback, useLifetime, useMountEffect, useMouse, usePrevious, useTagged, useThrottleCallback, useThrottleEffect, useThrottleState, useTimeout, useTimer, useUnmountEffect, useUpdate, useUpdateEffect, useViewport, binding util.

⏳ Pending: hoarcekat util.

🚫 Skipped: useMotion, useSpring — use react-ripple instead.

 

🌻 Contributing

Contributions are welcome. If you change a hook, update its tests and documentation as well.

To get started:

  1. Install the toolchain with Rokit:
    rokit install
    
    This installs rojo, wally, wally-package-types, selene, and stylua at the versions pinned in rokit.toml.
  2. Install dependencies and inject Luau types into the resolved packages:
    wally install
    wally-package-types --sourcemap sourcemap.json Packages
    wally-package-types --sourcemap sourcemap.json DevPackages
    
    Regenerate sourcemap.json with rojo sourcemap default.project.json -o sourcemap.json whenever the project structure changes.
  3. Lint and format:
    selene src
    stylua src
    
  4. Serve the project to Roblox Studio:
    rojo serve
    
  5. Run tests with TestEZ. The recommended workflow is the TestEZ Companion VS Code extension, which discovers and runs *.spec.luau files inside Roblox Studio while rojo serve is connected.

Recommended VS Code extensions:

 

🙏 Credits

Originally created by @littensy as pretty-react-hooks for roblox-ts. Ported to native Luau by @NotMirrox.

 

📝 License

pretty-react-hooks-luau is licensed under the MIT License.

Package Details

Install command (Click to copy)


Version

0.1.1

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.