import React, { useReducer, useState } from "react"; export function MyComponent(props: {}) { const [, forceUpdate] = useReducer(x => x + 1, 0); // somewhere.. forceUpdate(); return <></>; }
575100cookie-checkReact Hooks: Force Update
import React, { useReducer, useState } from "react"; export function MyComponent(props: {}) { const [, forceUpdate] = useReducer(x => x + 1, 0); // somewhere.. forceUpdate(); return <></>; }