UNPKG

@linzjs/step-ag-grid

Version:

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.

16 lines (12 loc) 657 B
import { useEffect, useLayoutEffect } from 'react'; // Get around a warning when using useLayoutEffect on the server. // https://github.com/reduxjs/react-redux/blob/b48d087d76f666e1c6c5a9713bbec112a1631841/src/utils/useIsomorphicLayoutEffect.js#L12 // https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85 // https://github.com/facebook/react/issues/14927#issuecomment-549457471 const useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect; export { useIsomorphicLayoutEffect as useLayoutEffect };