0.39.0 • Published 4 years ago

react-essential-tools v0.39.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

react-essential-tools

Collection of essential React Hooks and Components

Live storybook usage examples

Features

  • Easy to learn and use.
  • Contains a wealth of useful Components.
  • Contains a wealth of advanced Hooks that are refined from the app.
  • Contains a wealth of basic Hooks.
  • Written in TypeScript.

Installation

npm i react-essential-tools

Usage

You need to have React 16.8.0 or later installed to use the Hooks API. You can import each hook or component using ES6 named imports (tree shaking recommended).

import { Tooltip, useAsync } from 'react-essential-tools';

Components

SourcePreviewShort description
CircularProgressDemoProgress indicators commonly known as spinners, express an unspecified wait time or display the length of a process.
ModalDemoProvides a solid foundation for creating dialogs, popovers, lightboxes, or whatever else.
BackdropDemoA dimmed layer over your application.
SkeletonDemoPlaceholder for loading
NoSsrDisable SSR for content
TooltipDemoSmall popup with info
PopperDemoDisplays content on top of another
CollapseDemoAnimates expand/collapse of content
SlideDemoAnimates slide-in/slide-out of content
ZoomDemoAnimates zoom-in/zoom-out of content
FadeDemoAnimates fade-in/fade-out of content
GrowDemoAnimates scale-in/scale-out of content
PortalDemoRender content inside any target DOM-node

Hooks

SourcePreviewShort description
useDebouncedCallbackDemoGet debounced callback
useLongPressDemoFires a callback after long pressing
useHoverDemoTracks hovering of the element
useHistoryDemoState with undo/redo/reset
useMediaDemoCSS media query state
useMotionDemoDevice acceleration sensor state
useClipboardDemoRead and write to the user's clipboard
useMouseDemoMouse position state
useIntersectionDemoIntersection of elements\viewport state
useClickAwayDemoFires a callback on outside click
useNetworkDemoNetwork information state
useWindowScrollDemoWindow scroll position state
useKeyDemoFires a callback after configured keyboard keys usage
useEventDemoAdd listeners and auto-clean on unmount
useTimeoutFnDemoFires callback with delay
useIntervalDemoFires callback with controlled interval
usePreviousDemoPrevious state value
useUpdateEffectDemouseEffect with first invocation skip
useMountDemoFires callback on mount
useUnmountDemoFires callback on unmount
useLocalStorageSync state to localstorage
useAsyncDemoAsync/Promise resolved instantly to state
useAsyncFnDemoAsync/Promise resolved by callback to state
useBooleanDemoState with boolean value and toggle callback
useSetStateDemoState with similar to class components setState merging behavior
useFirstMountStateDemoReturn true on first component's render
useMountedStateDemoReturn callback to check if component is mounted
useIsomorphicLayoutEffectuseLayoutEffect that does not show warning when server-side rendering

License

This project is licensed under the MIT license, Copyright (c) 2019 Ruslan Povolockii. For more information see LICENSE.md.

0.39.0

4 years ago

0.38.2

4 years ago

0.38.1

4 years ago

0.38.0

4 years ago

0.37.3

4 years ago

0.37.2

4 years ago

0.37.1

4 years ago

0.36.0

4 years ago

0.35.0

4 years ago

0.34.2

4 years ago

0.34.1

4 years ago

0.33.0

4 years ago

0.32.0

4 years ago

0.31.0

4 years ago

0.30.0

4 years ago

0.29.0

4 years ago

0.28.0

4 years ago

0.27.0

4 years ago

0.24.0

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.0

4 years ago

0.20.0

4 years ago

0.19.0

4 years ago

0.18.0

4 years ago

0.17.0

4 years ago

0.16.0

4 years ago

0.15.0

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago