Search results: sample-use-new.gif

@vulppi/react-use-async

```tsx const Component: React.FC = () => { const { loading, error, value } = useAsync( fetch('https://jsonplaceholder.typicode.com/todos/1'), )

0.20.2 • Published 3 years ago

@vulppi/react-use-boolean

```tsx const Component: React.FC = () => { const [state, control] = useBoolean(true)

0.20.2 • Published 3 years ago

@vulppi/react-use-debounce

```tsx const Component: React.FC = () => { useDebounce( () => { //... }, 2000, ['foo'], )

0.20.2 • Published 3 years ago

@vulppi/react-use-imask

```tsx const Component = forwardRef((props, forwardRef) => { const ref = useIMask( { /* IMask options */ }, forwardRef /* forward ref is optional */, )

0.20.2 • Published 3 years ago

@vulppi/react-use-interval

```tsx const Component: React.FC = (props, ref) => { useInterval(() => { // ... }, 2000)

0.20.2 • Published 3 years ago

@vulppi/react-use-rerender

```tsx const Component: React.FC = (props, ref) => { const rerender = useRerender()

0.20.2 • Published 3 years ago

@vulppi/react-use-timeout

```tsx const Component: React.FC = (props, ref) => { useTimeout(() => { // ... }, 2000)

0.20.2 • Published 3 years ago

@vulppi/react-use-timer

```tsx const Component: React.FC = (props, ref) => { const [value, timerControl] = useTimer( 1, // Increment value 500, // Time step in millis )

0.20.2 • Published 3 years ago