useHooks
Một bộ sưu tập các React hooks hiện đại và an toàn cho máy chủ – từ đội ngũ ui.dev
Tiêu Chuẩn
Cài Đặt
npm i @uidotdev/usehooks
Hooks
- useBattery
- useClickAway
- useCopyToClipboard
- useCounter
- useDebounce
- useDefault
- useDocumentTitle
- useFavicon
- useGeolocation
- useHistoryState
- useHover
- useIdle
- useIntersectionObserver
- useIsClient
- useIsFirstRender
- useList
- useLockBodyScroll
- useLongPress
- useMap
- useMeasure
- useMediaQuery
- useMouse
- useNetworkState
- useObjectState
- useOrientation
- usePreferredLanguage
- usePrevious
- useQueue
- useRenderCount
- useRenderInfo
- useScript
- useSet
- useThrottle
- useToggle
- useVisibilityChange
- useWindowScroll
- useWindowSize
Thử Nghiệm
Cài Đặt
npm i @uidotdev/usehooks@experimental react@experimental react-dom@experimental
Hooks
- useContinuousRetry
- useCountdown
- useEventListener
- useFetch
- useInterval
- useIntervalWhen
- useKeyPress
- useLocalStorage
- useLogger
- usePageLeave
- useRandomInterval
- useSessionStorage
- useTimeout
.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# dotenv environment variables file
.env
# Mac files
.DS_Store
Chi Tiết Tải Xuống:
Tác Giả: uidotdev
Nguồn: https://github.com/uidotdev/usehooks
Giấy Phép: MIT license