Jesus sucks
This commit is contained in:
17
backend/frontend/node_modules/@restart/hooks/cjs/useForceUpdate.d.ts
generated
vendored
Normal file
17
backend/frontend/node_modules/@restart/hooks/cjs/useForceUpdate.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Returns a function that triggers a component update. the hook equivalent to
|
||||
* `this.forceUpdate()` in a class component. In most cases using a state value directly
|
||||
* is preferable but may be required in some advanced usages of refs for interop or
|
||||
* when direct DOM manipulation is required.
|
||||
*
|
||||
* ```ts
|
||||
* const forceUpdate = useForceUpdate();
|
||||
*
|
||||
* const updateOnClick = useCallback(() => {
|
||||
* forceUpdate()
|
||||
* }, [forceUpdate])
|
||||
*
|
||||
* return <button type="button" onClick={updateOnClick}>Hi there</button>
|
||||
* ```
|
||||
*/
|
||||
export default function useForceUpdate(): () => void;
|
||||
Reference in New Issue
Block a user