Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-tracked crashes with in react-native expo sdk-49 #193

Closed
sfl-moneytree opened this issue Aug 27, 2023 · 7 comments · Fixed by #200
Closed

React-tracked crashes with in react-native expo sdk-49 #193

sfl-moneytree opened this issue Aug 27, 2023 · 7 comments · Fixed by #200
Labels
help wanted Extra attention is needed

Comments

@sfl-moneytree
Copy link

Hello,

I've been using React-tracked with no issue for a while.
When upgrading to expo sdk49 which means using react 18.2.0, react-native 0.72.4 and running a basic example, React tracked 1.7.11 crashed on Provider creation (was working smoothly on sdk48).
Error: Not implemented. index.native.modern.js 1:444

Any help is welcome

@dai-shi
Copy link
Owner

dai-shi commented Aug 28, 2023

Thanks for reporting.

Does metro bundler change something? I'm not sure why they look for index.native.modern.js...
I need someone to help on this.

@dai-shi dai-shi added the help wanted Extra attention is needed label Aug 28, 2023
@sfl-moneytree
Copy link
Author

ok seems to have found the reason.
use-context-selector package has a file called batchedUpdates.ts
with export { unstable_batchedUpdates as batchedUpdates } from "react-dom";

and installing react-dom fix the issue, depencies was somehow missing, and you need to explcitely install it in expo sdk49. (not required in sdk48...not sure why)

Anyway thanks a lot

@dai-shi
Copy link
Owner

dai-shi commented Sep 15, 2023

We have that for react-native too.
https://github.com/dai-shi/use-context-selector/blob/bd4eb7492f0c2cfe9a1050ce924cf46c2f1b1150/src/batchedUpdates.native.ts#L3

I'm not sure why they look for index.native.modern.js...

That was my overlook. We have that defined in package.json
https://github.com/dai-shi/use-context-selector/blob/bd4eb7492f0c2cfe9a1050ce924cf46c2f1b1150/package.json#L13

So, I guess new react-native has changed something. There should be a way to fix it.

installing react-dom fix the issue

that's not a right fix, unfortunately.

@dai-shi dai-shi reopened this Sep 15, 2023
@orkanylmz
Copy link

any news about this?

@dai-shi
Copy link
Owner

dai-shi commented Oct 7, 2023

I think I need someone's help.

Error: Not implemented. index.native.modern.js 1:444

This is the only information provided.

Wait, where it it exactly?
https://unpkg.com/use-context-selector@1.4.1/dist/index.native.modern.js
image
That's 1:444. I wonder what is "Not implemented".

@dai-shi
Copy link
Owner

dai-shi commented Oct 7, 2023

Somewhere like this: https://github.com/dai-shi/use-context-selector/blob/bd4eb7492f0c2cfe9a1050ce924cf46c2f1b1150/src/index.ts#L32-L34

I'm not sure.

and installing react-dom fix the issue

and, that's also interesting. Why installing react-dom fixes index.native.modern.js...

@dai-shi
Copy link
Owner

dai-shi commented Mar 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants