meteor / react-packages

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

Rename deprecated lifecycle to support React 16.9 #274

Closed rj-david closed 4 years ago

rj-david commented 5 years ago

This is just to suppress the warnings in React 16.9 that can greatly affect development. This is a stop-gap solution while waiting for the new withTracker/useTracker implementation in another PR

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.

CaptainN commented 5 years ago

The deprecation warning only showed up in 16.9, but I don't know when the UNSAFE_ prefixed versions of these methods were added to React. In any case, this probably means the package's minor version at least should be incremented.

rj-david commented 5 years ago

Good point. I think it was in React 16.3 making this change incompatible to any version lower

rj-david commented 5 years ago

It was in 16.3 https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

CaptainN commented 5 years ago

Is it worth maintaining support with older versions of react? We could select between the UNSAFE prefixed method and the regular method based on the react version string stored in React.version.

This PR can be the basis for the V1 branch mentioned in #273.

filipenevola commented 4 years ago

hi @rj-david I believe this PR needs to be done against a new branch to create a version 1.0, right?

I just created the v1 https://github.com/meteor/react-packages/tree/v1 branch using this tag https://github.com/meteor/react-packages/releases/tag/react%4015.0.2

Are you going to use 1.0? It would be good to have someone that is going to use 1.0 leading a PR for this branch.

rj-david commented 4 years ago

@filipenevola, yes I believe so. But we are not going to remain at 1.0. We will be migrating all our active apps to 2.0

The only reason I created this PR was from the request of Ben because it looked like the PR by @CaptainN would not be merged soon (which is now available)

filipenevola commented 4 years ago

Hm ok, then I'm going to close this PR, if someone wants to use v1 just create a PR against v1 branch.

filipenevola commented 4 years ago

1.0.0 published https://github.com/meteor/react-packages/releases/tag/react-meteor-data%401.0.0