UNPKG

@liveblocks/react-ui

Version:

A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.

18 lines (14 loc) 456 B
'use strict'; var react = require('react'); function useRerender() { const [key, update] = react.useReducer( // This implementation works by incrementing a hidden counter value that is // never consumed. Simply incrementing the counter changes the component's // state and, thus, trigger a re-render. (key2) => key2 + 1, 0 ); return [update, key]; } exports.useRerender = useRerender; //# sourceMappingURL=use-rerender.cjs.map