react-moment icon indicating copy to clipboard operation
react-moment copied to clipboard

Support StrictMode

Open dimaqq opened this issue 6 years ago • 2 comments

[xxx] Warning: Unsafe lifecycle methods were found within a strict-mode tree:
    in StrictMode (at [xxx])

componentWillMount: Please update the following components to use componentDidMount instead: t

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: t

dimaqq avatar Apr 16 '19 06:04 dimaqq

I was getting thousands of errors in my console when I ran strict mode uncaught TypeError: (n.globalFilter || e.filter) is not a function, not so sure this library is ready for react 18

davidrenne avatar Sep 04 '22 03:09 davidrenne

@dimaqq and other people searching for this problem, I got around this issue of logging like crazy by passing this as a prop to all my callers.

filter={(v) => { return v; }} It seems like react is not honoring the defaultProps when in strict mode. I am not sure why, I did a google on it but couldnt find a definitive answer.

davidrenne avatar Sep 14 '22 20:09 davidrenne