Giter Site home page Giter Site logo

littensy / pretty-react-hooks Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 5.0 248 KB

๐Ÿ’ A collection of useful hooks for roblox-ts and React

Home Page: https://npmjs.com/package/@rbxts/pretty-react-hooks

License: MIT License

TypeScript 100.00%
react roblox roblox-ts typescript

pretty-react-hooks's Introduction

GitHub Workflow Status npm version npm downloads GitHub license

An opinionated collection of useful hooks and utilites for React in roblox-ts.

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

ย 

โญ Featured

Check out some featured hooks:

This package also exports some useful utilities:

Or, see the full list of hooks.

ย 

๐Ÿ“ฆ Installation

This package is available for Roblox TypeScript projects on NPM.

npm install @rbxts/pretty-react-hooks
yarn add @rbxts/pretty-react-hooks
pnpm add @rbxts/pretty-react-hooks

ย 

๐ŸŒป Contributing

Contributions are welcome! Note that if you make a change to a hook, you should also check the tests and documentation.

To get started, clone the repository and run pnpm install. Then, you can run the following commands:

  • pnpm dev - Enable watch mode with support for TestEZ Companion
  • pnpm build - Compile the package's out directory

You will likely need the following extensions:

ย 

๐Ÿ“ License

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

pretty-react-hooks's People

Contributors

daymxn avatar irevolutiondev avatar littensy avatar wad4444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pretty-react-hooks's Issues

useCamera can return undefined

The current camera connection uses a non-null assertion when retrieving the camera. This should instead be wrapped in an if statement.

Some tests that yield are inconsistent

A lot of tests yield in order to test things like debounces and timers, and they can be inconsistent across different devices.

Some changes are needed to make these tests more repeatable.

Bug with package if it used by the plugin

I was making a plugin using React and I found a problem: if you reload the plugin (during an update or just disable/enable) the React breaks
After some digging, I found that the problem is _G.ROACT_17_MOCK_SCHEDULER.
if that variable is not nil, react will not render the root

that can be a problem for the plugins using React, if ROACT_17_MOCK_SCHEDULER is not nil they will not be able to render the plugin GUI.
the only file that sets it is testez
out -> utils -> testez
image

Is it possible to delay requiring that script or at least setting this flag when some of its components are used?

something like

let initialized = false

function checkInitialization(){
 if(initialized) return;
 initialized = true;
 _G.__ROACT_17_MOCK_SCHEDULER__ = true;
}

function ...Hook(){
checkInitialization()
 ...
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.