I am currently a Senior Software Engineer at Zendesk!
jamessingleton / hooks-arsenal Goto Github PK
View Code? Open in Web Editor NEWAn arsenal of React Hooks... aka, a React Hooks library
Home Page: hooks-arsenal.vercel.app
License: MIT License
An arsenal of React Hooks... aka, a React Hooks library
Home Page: hooks-arsenal.vercel.app
License: MIT License
It would be awesome to use https://v2.docusaurus.io/ for documentation.
Test
Create GitHub Issue Template
Not every component/hook/utils have unit tests. It would be awesome to have 100% code coverage.
Create GITHUB PR templates
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.
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
New hook that enables or disables dark mode.
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates are currently rate limited. Click on a checkbox below to force their creation now.
@docusaurus/core
, @docusaurus/preset-classic
)react
, react-dom
, react-test-renderer
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
eslint
, eslint-config-amex
, eslint-plugin-jest
, eslint-plugin-prettier
)@semantic-release/npm
, semantic-release
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
@commitlint/cli
, @commitlint/config-conventional
, @mdx-js/react
, clsx
, jest
, lint-staged
, prism-react-renderer
, react
, react-dom
)Update the PR template to be more accurate. Right now it is super generic.
Unit tests are missing for the following hooks:
Add ability to detect network status
New hook to track internet connection
Setup CircleCI to build and deploy
Use Rollup for bundling the library
Is there any plan to include documentation for the hooks provided here?
I think it'd be helpful to get the word out!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.