HeaderBackButton给出错误反应导航堆栈

时间:2020-05-21 12:53:00

标签: reactjs react-native react-navigation-stack

我将React Native项目从0.61.5升级到0.62.2,此后出现了以下错误:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined

下面是代码:

import { HeaderBackButton } from "react-navigation-stack";
return (<HeaderBackButton 
          label={params.lastScreenTitle} 
          labelStyle={{
            color:fontColor
          }}
          tintColor={fontColor}
          onPress={() => navigation.goBack(null)} />)

react-navigation版本4.1.0

react-navigation-stack版本2.5.1

0 个答案:

没有答案