use-force-render
Allows forcing the rendering of the webcomponent without the need to be tied to a state or property
Modulo
import { useForceRender } from "@atomico/hooks/use-force-render";Syntax
const forceRender = useForceRender();Example
function component() {
const ref = useRef();
const forceRender = useForceRender();
return (
<host>
{ref.current.anyProp}
<my-component ref={ref} onclick={forceRender}></my-component>
</host>
);
}Last updated
Was this helpful?
