進出口特林添加漢堡包圖標,打開抽屜上的反應,native.but即時得到這個錯誤陣營本地導航加入漢堡圖標
對象是不是一個做出反應的孩子有效(發現:對象,具有鍵{}左)。如果您打算渲染一組兒童,請改用數組,或者使用React附加組件中的createFragment(object)來包裝對象。
Check the render method of `View`.
這是routes.js
import { StackNavigator, TabNavigator, DrawerNavigator } from 'react-navigation';
const DrawerIcon = ({ navigate }) => {
return(
<Icon
name = "md-menu"
size = {38}
color = "black"
style = {{paddingLeft : 20}}
onPress = {() => navigate('DrawerOpen')}
/>
);
};
export const Stack1 = StackNavigator({
Screen1: {
screen: screen1,
navigationOptions: {
header: (props) => ({
left: <DrawerIcon { ...props } />
}),
}
},
Screen2: {
screen: screen2,
},
Screen3: {
screen: screen3,
},
})
export const Drawer = DrawerNavigator({
Home:{
screen: Stack1,
navigationOption: {
brawerLabel: 'Home',
}
},
Camera:{
screen: Stack2,
navigationOption: {
brawerLabel: 'Camera',
}
},
Info:{
screen: Stack3,
navigationOption: {
brawerLabel: 'Info',
}
}
})
我怎樣才能解決這個error.Thanks。
但是當我在側面調用'this.props.navigation.navigate('DrawerOpen')'headerRight: