UNPKG

use-truncate-from-middle

Version:

React hook which dynamically calculates the maximum number of characters that fit into an HTML element and truncates the text from middle with given middle chars.

4 lines (3 loc) 151 B
import { useLayoutEffect } from 'react'; declare const useIsomorphicLayoutEffect: typeof useLayoutEffect; export default useIsomorphicLayoutEffect;