This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dispatch, SetStateAction } from 'react'; | |
type Setter<S> = Dispatch<SetStateAction<S>>; | |
/** | |
* Can be used in custom hooks and allows you to get the current state from the `useState` hook | |
* without adding a dependency. | |
* @param setter | |
* @example | |
* ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createAsyncThunk, AsyncThunkPayloadCreator, AsyncThunk } from '@reduxjs/toolkit'; | |
type DebounceSettings = { | |
/** | |
* The maximum time `payloadCreator` is allowed to be delayed before | |
* it's invoked. | |
* @defaultValue `0` | |
*/ | |
maxWait?: number; | |
/** |