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
{{ message }}
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
/* Untyped file generated by genType. */import{createBottomTabNavigatorascreateBottomTabNavigatorNotChecked}from'react-navigation';import{createAppContainerascreateAppContainerNotChecked}from'react-navigation';// In case of type error, check the type of 'createBottomTabNavigator' in 'Navigation.re' and 'react-navigation'.exportconstcreateBottomTabNavigatorTypeChecked=createBottomTabNavigatorNotChecked;// Export 'createBottomTabNavigator' early to allow circular import from the '.bs.js' file.exportconstcreateBottomTabNavigator=function_(Arg1,Arg2){constresult=createBottomTabNavigatorTypeChecked({Friends:Arg1[0]},{tabBarOptions:{activeTintColor:$$toJS479407683[Arg2[0][0]],inactiveTintColor:$$toJS479407683[Arg2[0][1]]}});returnresult};// In case of type error, check the type of 'createAppContainer' in 'Navigation.re' and 'react-navigation'.exportconstcreateAppContainerTypeChecked=createAppContainerNotChecked;// Export 'createAppContainer' early to allow circular import from the '.bs.js' file.exportconstcreateAppContainer=createAppContainerTypeChecked;constNavigationBS=require('./Navigation.bs');const$$toJS479407683={"322339018": "tomato","-999567389": "gray"};exportconstcomponent=NavigationBS.component;
Which causes this error
Moving the line const $$toJS479407683 = {"322339018": "tomato", "-999567389": "gray"}; above the usage of it fixes the error.
This is a really specific case since it only happens in React Native and not in web but it was still unexpected.
The text was updated successfully, but these errors were encountered:
Any thought on how it would happen only in React Native?
For technical reasons imports have to be circular (from/to the .bs.js file) and it looks like each tool has a different interpretation of the semantics.
The circular dependencies are actually not a problem in React Native, only the decleration after use so getting that fixed should fix the issue. React Native only gives a warning about the circular deps so that's fine.
But I do believe that the metro bundler is stricter in a lot of cases than it's web counter parts. I have no idea why though, but some standard node things like symlinks and package hoisting (or even just requiring files outside of the project root) will break React Native for some reason.
I have this code
Which produces
Which causes this error
Moving the line
const $$toJS479407683 = {"322339018": "tomato", "-999567389": "gray"};
above the usage of it fixes the error.This is a really specific case since it only happens in React Native and not in web but it was still unexpected.
The text was updated successfully, but these errors were encountered: