Closed zeohera closed 9 months ago
Hey @zeohera,
I've checked your issue, was able to reproduce it and found the solution:
you have to add the following imports in host's index.js
file:
import 'react-native-pager-view';
import 'react-native-tab-view';
As you are not using react-native-tab-view
or react-native-pager-view
inside of the host app, webpack
detects this dependency as being unused and strips it from the bundle completely. Adding imports like this ensures the whole dependency will be included in the host app and will be made available for consumption by the mini-apps
it works, thanks @jbroma
Environment
nodejs 16.14.2 on apple silicon macintosh
Description
I want to use React Native Tab View https://reactnavigation.org/docs/tab-view/ on a mini app but face with "View config getter callback for component
RNCViewPager
must be a function (receivedundefined
)" Render Error.i am install with
yarn workspace dashboard add react-native-tab-view react-native-pager-view
and put demo component into Dashboard/AccountScreen
Is this an error? or Is there anything wrong with my implementation?
Reproducible Demo
link to the demo issue https://github.com/zeohera/super-app-showcase
run project and go to services tab >> dashboard card >> account tab to see this issue happen.