meteor / react-packages

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

react-meteor-data 2.1.0 changes withTracker default pure component option #287

Closed wolasss closed 4 years ago

wolasss commented 4 years ago

Hello,

I noticed that after upgrading to meteor@1.10.2 my app has got some significant performance issues compared to meteor@1.10.1. After some digging, I narrowed it down to the react-meteor-data package.

This PR introducing typescript was merged in the latest release: https://github.com/meteor/react-packages/pull/283

Before withTracker by default returned a PureComponent, but if passed pure option as false it returned normal component: https://github.com/meteor/react-packages/blob/85a9a8386fabb610f4c3ef9c1fc40d3e8974518a/packages/react-meteor-data/withTracker.jsx

But after the changes in the PR one has to explicitly pass pure=true in the options in order to return the same result: https://github.com/CaptainN/react-packages/blob/9500f1457d7aa3b8004fb691c33e8256f4b640b6/packages/react-meteor-data/withTracker.tsx

which I think is a regression. I think withTracker should have the same behaviour as before - it should return pure component by default OR there should be a notice in the documentation and breaking change api version should be released.

CaptainN commented 4 years ago

Definitely a regression. Will fix.

filipenevola commented 4 years ago

2.1.1 is published now.