UNPKG

@chakra-ui/hooks

Version:

React hooks for Chakra components

15 lines (11 loc) 270 B
'use client'; 'use strict'; var react = require('react'); function useConst(init) { const ref = react.useRef(null); if (ref.current === null) { ref.current = typeof init === "function" ? init() : init; } return ref.current; } exports.useConst = useConst;