React-meteor-data - pinned to react 17.0.2?

Hey all - wondering on the feasibility of moving react-meteor-data to 18.3.1? I can see it’s currently pinned to 17.0.2. For context, I’m in the middle of upgrading to meteor 3 and have everything else using react 18.3.1, but am getting an invalid hook call, and I suspect it’s due to react-meteor-data being at a previous version. This may be an incorrect assumption, but before I pursue any work on this, was wondering on any thoughts from the community on a PR to move react-meteor-data to react ^18.x? Thanks!

yes it’s worked, I use Meteor2.16 + React18.3.1 + react-meteor-data latest.
I no idea about you invalid hook call, maybe other error?

PS: I not test Meteor3.0

We have completed the long-overdue revitalization of the react-packages repository, addressing tech debt in essential packages for React users. As part of this, we restored tests for react-meteor-data and react-meteor-accounts, ensured they run correctly, enabled CI for quick checks on contributions and fixes, and upgraded tests for compatibility with React 18.x.

From now on, reviewing features and fixes in these packages will be easier, as recently needed.

3 Likes

Thanks @nachocodoner :+1:

Is this agnostic to meteor versions (any meteor version supporting react 18) or is this only for meteor 3?

1 Like

This is great news. I will try it out and respond here. Thanks!

I know Meteor React packages uses Meteor-specific primitives for subscriptions and reactive vars. Meteor 3 might have changed the implementation on fiber migration, but tests for Meteor 3 passed the compatibility check. The React upgrade to 18.x didn’t affect the tests, and I don’t think it would impact Meteor 2 specifically.

If we ever identify an issue, we’ll ensure CI checks run tests across Meteor and React versions.

I want to highlight an issue that has been identified but isn’t covered by tests. The community is working on a solution, though it seems to have existed for some time. Just for your awareness.

I’ve run meteor update react-meteor-data and am getting

The specified packages are at their latest compatible versions.

The last publish of react-meteor-data to be react-meteor-data@3.0.3 from 3 months ago. The package-lock.json file there lists react 17 as its dependency:

 "dependencies": {
        "@testing-library/react": "^12.0.0",
        "@types/meteor": "^1.4.76",
        "@types/react": "^17.0.16",
        "fast-deep-equal": "^3.1.3",
        "lodash.isequal": "^4.5.0",
        "lodash.remove": "^4.7.0",
        "react": "17.0.2",
        "react-dom": "17.0.2",
        "react-test-renderer": "17.0.2"
      },

Is there a plan to publish these most recent changes, or am I thinking about this incorrectly? Thanks for any help and guidance!