Coder Social home page Coder Social logo

jamessingleton / hooks-arsenal Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 3.0 10.68 MB

An arsenal of React Hooks... aka, a React Hooks library

Home Page: hooks-arsenal.vercel.app

License: MIT License

JavaScript 94.43% CSS 5.57%
hacktoberfest hooks react react-hooks

hooks-arsenal's Introduction

James Singleton

What I Do

I am currently a Senior Software Engineer at Zendesk!

Technology I Use

HTML5 Logo CSS3 Logo JavaScript Logo React Logo
Next.js Logo ESLint Logo Git Logo VSCode Logo

How to reach me

LINKEDIN TWITTER

James Singleton's github stats Top Langs

hooks-arsenal's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar francois-esquire avatar heythisispaul avatar jamessingleton avatar loganarnett avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hooks-arsenal's Issues

Add missing unit tests

Not every component/hook/utils have unit tests. It would be awesome to have 100% code coverage.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Clean up console.error when running tests

When running tests, the following is printed in the terminal. If this is what the end user gets when an error occurs with useHandleForm we should clean that up. @heythisispaul

PASS __tests__/hooks/useHandleForm.js
  โ— Console

    console.error src/hooks/useHandleForm.js:30
      Error: error time
          at C:\Users\james\Documents\coding\hooks-arsenal\__tests__\hooks\useHandleForm.js:69:52
          at finalReturnValue (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-mock\build\index.js:480:41)
          at C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-mock\build\index.js:489:13
          at submitFunction (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-mock\build\index.js:182:19)
          at handleSubmit$ (C:\Users\james\Documents\coding\hooks-arsenal\src\hooks\useHandleForm.js:24:28)
          at tryCatch (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
          at Generator.invoke [as _invoke] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:271:22)
          at Generator.prototype.(anonymous function) [as next] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)
          at tryCatch (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
          at invoke (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:135:20)   
          at C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:170:11
          at new Promise (<anonymous>)
          at callInvokeWithMethodAndArg (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:169:16)
          at AsyncIterator.enqueue (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:192:13)
          at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)
          at Object.<anonymous>.exports.async (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:216:14)
          at Object.handleSubmit (C:\Users\james\Documents\coding\hooks-arsenal\src\hooks\useHandleForm.js:18:24)
          at C:\Users\james\Documents\coding\hooks-arsenal\__tests__\hooks\useHandleForm.js:76:22
          at batchedUpdates (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\react-test-renderer\cjs\react-test-renderer.development.js:14454:12)
          at act (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\react-test-renderer\cjs\react-test-renderer.development.js:17271:14)    
          at _callee3$ (C:\Users\james\Documents\coding\hooks-arsenal\__tests__\hooks\useHandleForm.js:75:5)
          at tryCatch (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
          at Generator.invoke [as _invoke] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:271:22)
          at Generator.prototype.(anonymous function) [as next] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)
          at tryCatch (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
          at invoke (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:135:20)   
          at C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:170:11
          at new Promise (<anonymous>)
          at callInvokeWithMethodAndArg (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:169:16)
          at AsyncIterator.enqueue (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:192:13)
          at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)
          at Object.<anonymous>.exports.async (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:216:14)
          at Object._callee3 (C:\Users\james\Documents\coding\hooks-arsenal\__tests__\hooks\useHandleForm.js:67:43)
          at Object.asyncJestTest (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-jasmine2\build\jasmineAsyncInstall.js:102:37)     
          at resolve (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-jasmine2\build\queueRunner.js:43:12)
          at new Promise (<anonymous>)
          at mapper (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-jasmine2\build\queueRunner.js:26:19)
          at promise.then (C:\Users\james\Documents\coding\hooks-arsenal\node_modules\jest-jasmine2\build\queueRunner.js:73:41)```

Add useDarkMode

๐Ÿš€ Feature Request

Add useDarkMode

๐Ÿ”ฆ Scope

New hook that enables or disables dark mode.

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Rate Limited

These updates are currently rate limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @commitlint/cli to v16.2.3
  • chore(deps): update dependency lint-staged to v12.3.7
  • fix(deps): update docusaurus monorepo to v2.0.0-beta.18 (@docusaurus/core, @docusaurus/preset-classic)
  • chore(deps): update dependency prettier to v2.6.2
  • chore(deps): update actions/checkout action to v3
  • chore(deps): update actions/setup-node action to v3
  • chore(deps): update actions/stale action to v5
  • chore(deps): update dependency @testing-library/react to v13
  • chore(deps): update dependency amex-jest-preset-react to v8
  • fix(deps): update react monorepo to v18 (major) (react, react-dom, react-test-renderer)
  • chore(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

  • chore(deps): pin dependencies (@commitlint/cli, @commitlint/config-conventional, @mdx-js/react, clsx, jest, lint-staged, prism-react-renderer, react, react-dom)

  • Check this box to trigger a request for Renovate to run again on this repository

Update PR template

Update the PR template to be more accurate. Right now it is super generic.

Documentation

Is there any plan to include documentation for the hooks provided here?

I think it'd be helpful to get the word out!

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.