mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 14:43:03 -04:00
WhoReacted: Make more reliable & don't spam api
This commit is contained in:
parent
bb398970ef
commit
b60f6cb18d
6 changed files with 104 additions and 13 deletions
|
@ -70,6 +70,11 @@ export function useAwaiter<T>(factory: () => Promise<T>, fallbackValue: T | null
|
|||
return [state.value, state.error, state.pending, () => setSignal(signal + 1)];
|
||||
}
|
||||
|
||||
export function useForceUpdater() {
|
||||
const [, set] = React.useState(0);
|
||||
return () => set(s => s + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* A lazy component. The factory method is called on first render. For example useful
|
||||
* for const Component = LazyComponent(() => findByDisplayName("...").default)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue