最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - After ugrading to Expo SDK 52 Menu component [React-native-paper] started to throw TypeError: Cannot convert undefi

programmeradmin3浏览0评论

After upgrading to Expo SDK 52 Menu component started to throw this error:

I have checked all the dependencies and they match Expo SDK 52 requirements.

    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "^0.76.6",
    "react-native-appsflyer": "^6.9.4",
    "react-native-collapsible": "^1.6.0",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-drop-shadow": "^0.0.6",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-image-viewing": "^0.2.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "1.18.0",
    "react-native-modal-datetime-picker": "^17.0.0",
    "react-native-pager-view": "6.5.1",
    "react-native-paper": "^5.13.1",
    "react-native-paper-dropdown": "^1.0.7",
    "react-native-popover-view": "^5.1.7",
    "react-native-ratings": "^8.1.0",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-reanimated": "~3.16.6",
    "react-native-redash": "^18.1.0",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",
    "react-native-signature-canvas": "^4.3.0",
    "react-native-svg": "15.8.0",
    "react-native-switch-selector": "^2.3.0",
    "react-native-tab-view": "^3.3.0",
    "react-native-timeline-flatlist": "^0.8.0",
    "react-native-timeline-listview": "^0.2.3",
    "react-native-toggle-element": "^2.0.1",
    "react-native-uuid": "^2.0.1",
    "react-native-vector-icons": "^9.1.0",
    "react-native-version-check": "^3.4.7",
    "react-native-web": "~0.19.10",
    "react-native-webview": "13.12.5",
    "react-navigation": "^4.4.4",
    "react-redux": "^8.1.1",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.4.1",

I even tried to replace my use of Menu with the one provided from Paper. Still the same error:

export const FancyMenu = () => {
  const [visible, setVisible] = React.useState(false);

  const openMenu = () => setVisible(true);

  const closeMenu = () => setVisible(false);

  return (
      <View
        style={{
          paddingTop: 50,
          flexDirection: 'row',
          justifyContent: 'center',
        }}>
        <Menu
          visible={visible}
          onDismiss={closeMenu}
          anchor={<Button onPress={openMenu}>Show menu</Button>}>
          <Menu.Item onPress={() => {}} title="Item 1" />
          <Menu.Item onPress={() => {}} title="Item 2" />
          <Menu.Item onPress={() => {}} title="Item 3" />
        </Menu>
      </View>
  );
};

Expo doctor also returns that project is in good shape.

What else should I look into?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论