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
/** | |
* useAsyncEffect - safely use async/await within React effects | |
* | |
* Original code by François Zaninotto from: https://marmelab.com/blog/2023/01/11/use-async-effect-react.html | |
* Modified by Michał Leszczyński (icedev.pl) | |
*/ | |
import {useEffect, useState, useMemo, useRef, type DependencyList} from 'react' | |
interface IUseAsyncEffectResultNotReady { |