Skip to content

feat: bump react-native to 0.76.6 on example app #73

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

renanmav
Copy link
Member

@renanmav renanmav commented Jan 31, 2025

This PR bumps react-native to v0.76.6 on example app.

New architecture (fabric) is not enabled.

https://react-native-community.github.io/upgrade-helper/?from=0.71.6&to=0.76.6&package=com.bignumberexample&name=BigNumberExample

@renanmav
Copy link
Member Author

renanmav commented Jan 31, 2025

Both Android & iOS apps are building successfully now, but the library is not linked correctly when the new achitecture is enabled. When I try to run the tests on the example app, I get this error:

 (NOBRIDGE) ERROR  Error: Failed to install react-native-bignumber: React Native is not running on-device. BigNumber can only be used when synchronous method invocations (JSI) are possible. If you are using a remote debugger (e.g. Chrome), switch to an on-device debugger (e.g. Flipper) instead.

 (NOBRIDGE) ERROR  Warning: TypeError: Cannot read property 'NativeBigNumber' of undefined

This error is located at:
    in TestingScreen (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by SceneView)
Android iOS

@renanmav
Copy link
Member Author

renanmav commented Feb 1, 2025

^ actually, let's disable the new architecture.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is pulled out from #72, it makes this library compile for RN 76 on Android, but it still does not work for the new architecure.

Seems like the library is not linked properly when fabric is enabled.

auto workerQueue = std::make_shared<margelo::DispatchQueue::dispatch_queue>("Margelo MGBigNumber Thread");
auto hostObject = std::make_shared<margelo::MGBigNumberHostObject>(jsCallInvoker, workerQueue);
auto object = jsi::Object::createFromHostObject(runtime, hostObject);
runtime.global().setProperty(runtime, "__BigNumberProxy", std::move(object));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's migrate it to Nitro after we made the RN 76 upgrade. WIth Nitro, we no longer need any of this install(..) f*ckery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants