попробуйте apt-файл. Трудно запомнить имя пакета, в котором находится отсутствующий файл. Он является общим и полезным для любых файлов пакетов.
Например:
root@ubuntu234:~/auto# apt-file search --regexp '/Python.h$'
pypy-dev: /usr/lib/pypy/include/Python.h
python2.7-dbg: /usr/include/python2.7_d/Python.h
python2.7-dev: /usr/include/python2.7/Python.h
python3.2-dbg: /usr/include/python3.2dmu/Python.h
python3.2-dev: /usr/include/python3.2mu/Python.h
root@ubuntu234:~/auto#
Теперь вы можете сделать экспертную догадку о том, какой из них выбрать.
<TouchableOpacity
onPress={() =>
this.props.navigation.navigate(
'Details',
{
/*how to pass data here*/
Name:'Jhon Lennon',
Age: 58
Male: true
}
)}
>
На подробном экране
class DetailsScreen extends React.Component {
componentDidMount() {
this.getInfo();
}
getInfo(){
//you can do it this way or access it directly
//var Name =this.props.navigation.getParam('Name ', 'No Name'); //second parameter is a callback
//var Age=this.props.navigation.getParam('Age', 20);
//var Male=this.props.navigation.getParam('Male', false);
}
render() {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>The Name is {this.props.navigation.state.params.Name||'NoName'} /*NoName is also a callback*/</Text>
<Text>you are {this.props.navigation.state.params.Age||'0'} years old /*0 is the callback*/</Text>
</View>
);
}
}
Более подробная информация здесь
Кроме того, следует избегать наматывания корневого навигатора внутри компонента
[112 ]Должно быть просто
export default createAppContainer(RootStack);