TypeError: _ReanimatedModule.default.animateNextTransition is not a function in React-native-navigation
TypeError: _ReanimatedModule.default.animateNextTransition is not a function in React-native-navigation
当前行为
When you click on the text, you get an error with the title.
预期行为
希望画面移动流畅,不被截断,不出现白屏。
如何重现
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"
| npm 或纱线 | 6.9.0
请多多帮助
感谢您的帮助。
它目前在 sdk 32 中不可用。sdk 33 即将推出。
这在 the readme
中有记录
当前行为
When you click on the text, you get an error with the title.
预期行为
希望画面移动流畅,不被截断,不出现白屏。
如何重现
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"
| npm 或纱线 | 6.9.0
请多多帮助
感谢您的帮助。
它目前在 sdk 32 中不可用。sdk 33 即将推出。
这在 the readme
中有记录