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

Unsafe lifecycle methods were found within a strict-mode tree

Open emyk opened this issue 6 years ago • 1 comments

Running React >= 16.3 with React.StrictMode results in the following warning

index.js:2178 Warning: Unsafe lifecycle methods were found within a strict-mode tree: in Router (created by BrowserRouter) in BrowserRouter (at App.js:13) in Provider (at App.js:12) in Unknown (at index.js:42) componentWillUpdate: Please update the following components to use componentDidUpdate instead: Remarkable Learn more about this warning here: https://fb.me/react-strict-mode-warnings

emyk avatar Apr 03 '18 08:04 emyk

I've rewritten Remarkable as a function component to get rid of the outdated lifecycle methods: https://github.com/nicolasschabram/react-remarkable/pull/1. It should be functionally equivalent although I haven't thoroughly tested it yet. Would you accept a PR? @acdlite @mxstbr

nicolaslohrer avatar Jul 22 '20 13:07 nicolaslohrer