angular2react icon indicating copy to clipboard operation
angular2react copied to clipboard

Rename unsafe component lifecycle methods

Open Irev-Dev opened this issue 6 years ago • 0 comments

Hey @bcherny, Thanks a bunch for this tool. It's making migrating to react possible for us 🎉 .

I'm getting some noise in the console because of this, and #32 is asking for it.

Even though there was only two instances I used npx react-codemod rename-unsafe-lifecycles to be extra safe. apart from the fact that it also added a semicolon on line 105 of index.tsx which I removed again.

Facebooks link for why they were renamed. https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

Tests are passing, obviously, an update of React was needed for these the new lifecycle methods to be recognized.

If in future if you want to move away from these "unsafe" lifecycle methods as fb is suggesting, I'd be willing to take a crack at it, you're okay with answering questions if I get stuck understanding the existing functionality?

Irev-Dev avatar Oct 17 '19 15:10 Irev-Dev