meteor / react-packages

Meteor packages for a great React developer experience
http://guide.meteor.com/react.html
Other
573 stars 158 forks source link

[WIP] Update lifecycle methods for newer React #261

Closed StorytellerCZ closed 5 years ago

StorytellerCZ commented 6 years ago

Starting on a fix for #252 and #256 (and maybe #242) Sadly it isn't as easy as replacing it with the recommended new methods (in short that breaks everything). Moving componentWillMount functionality to constructor fixes that part, but componentWillUpdate has no easy backward compatible solution. So at least I'm presenting here this half fix and hopefully I can figure out something later or someone else can finish what I started. :thinking:

CaptainN commented 5 years ago

You can just do the work in render instead of componentWillUpdate. ;-)

The hooks implementation in #262 actually takes care of this for React 16.8+, so there's probably not a whole lot of reason to mess with the old withTracker version, which will continue to work for React 16.7 and lower.

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

StorytellerCZ commented 5 years ago

Well, this has been superseded by much better PRs.