Текущее поведение
При нажатии на текст появляется ошибка с заголовком.
Ожидаемое поведение
Я надеялся, что экран будет плавно двигаться, не обрезаясь и не показывая белый экран.
Как воспроизвести
App.js
import React from "react";
import createAnimatedSwitchNavigator from "react-navigation-animated-switch";
import { Transition } from "react-native-reanimated";
import {
createDrawerNavigator,
createAppContainer,
createStackNavigator
} from "react-navigation";
import A from "./A";
import B from "./B";
const MySwitch = createAnimatedSwitchNavigator(
{
Home: A,
Other: B
},
{
initialRouteName: "Home",
headerMode: "none"
},
{
// The previous screen will slide to the bottom while the next screen will fade in
transition: (
<Transition.Together>
<Transition.Out
type="slide-bottom"
durationMs={400}
interpolation="easeIn"
/>
<Transition.In type="fade" durationMs={500} />
</Transition.Together>
)
}
);
const HomeScreenRouter = createAppContainer(MySwitch);
export default HomeScreenRouter;
A.js
import React from "react";
import { StyleSheet, Text, View, TouchableHighlight } from "react-native";
export default class A extends React.Component {
constructor(props) {
super(props);
this.state = {
loading: false
};
}
render() {
return (
<View style={styles.container}>
<Text onPress={() => this.props.navigation.navigate("Other")}>
Open up App.js to start working on your app!
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center"
}
});
B.js
import React from "react";
import { StyleSheet, Text, View } from "react-native";
export default class B extends React.Component {
constructor(props) {
super(props);
this.state = {
loading: false
};
}
render() {
return (
<View style={styles.container}>
<Text>B screen</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center"
}
});
Ваше окружение
| реактивная навигация | "^ 3.11.0"
| Реактивный «https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
| узел | v10.16.0
| Реакция-родной-реанимированный | "^ 1.0.1"
| реакция-навигация-анимация-переключатель | "^ 0.2.0"
| нпм или пряжа | 6.9.0
Пожалуйста, помогите мне очень
Спасибо за вашу помощь.