You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Expo 49:
I am unable to use the React.lazy functionality which allows to defer loading component’s code until it is rendered for the first time.
On Expo Web, the Lazy Component works, no problem.
But, on Expo Android, the below error is given: "Render Error: Cannot read property 'nativeModule' of undefined". I did the test on two Android devices.
I tried everything. Even in a default app, the issue occurs. Noting that I did the test on Expo 48 and the bug does not occur.
vonmaster
changed the title
Lazy Components not working on Expo Android: "Render Error: Cannot read property 'nativeModule' of undefined"
React Lazy Components not working on Expo Android: "Render Error: Cannot read property 'nativeModule' of undefined"
Dec 30, 2023
Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.
# Why
fixes#26174
close ENG-11097
# How
on android, the `RCTNetworking` has slight difference than on ios. it's
a derived class from `NativeEventEmitter`. we should make sure the
`this` pointer is valid. this pr tries to bind the this pointer to the
correct `RCTNetworking`.
# Test Plan
testing lazy component in router-e2e and expo-go.
# Why
fixes#26174
close ENG-11097
# How
on android, the `RCTNetworking` has slight difference than on ios. it's
a derived class from `NativeEventEmitter`. we should make sure the
`this` pointer is valid. this pr tries to bind the this pointer to the
correct `RCTNetworking`.
# Test Plan
testing lazy component in router-e2e and expo-go.
(cherry picked from commit 3b57ce1)
Summary
Hi all,
Using Expo 49:
I am unable to use the React.lazy functionality which allows to defer loading component’s code until it is rendered for the first time.
On Expo Web, the Lazy Component works, no problem.
But, on Expo Android, the below error is given: "Render Error: Cannot read property 'nativeModule' of undefined". I did the test on two Android devices.
I tried everything. Even in a default app, the issue occurs. Noting that I did the test on Expo 48 and the bug does not occur.
What platform(s) does this occur on?
Android
SDK Version
49
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.1.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: AI-231.9392.1.2311.11076708
npmPackages:
expo: ~49.0.18 => 49.0.21
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
react-native-web: ~0.19.6 => 0.19.10
Expo Workflow: managed
Minimal reproducible example
npx create-expo-app@latest --template tabs@49
components
folder, say:app / (tabs) / index.tsx
file the Lazy Component :The text was updated successfully, but these errors were encountered: