gpt4 book ai didi

react-native - 类型错误 : null is not an object (evaluating '_ReanimatedModule.default.createNode' )

转载 作者:行者123 更新时间:2023-12-04 13:55:32 28 4
gpt4 key购买 nike

我无法解决此问题,并查看了以下文档
https://www.npmjs.com/package/react-native-tab-view
enter image description here
我也没有遇到任何关于这个问题的文件。我使用了上面链接中提到的相同示例代码。

import * as React from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';
import { TabView, SceneMap } from 'react-native-tab-view';

const FirstRoute = () => (
<View style={[styles.scene, { backgroundColor: '#ff4081' }]} />
);

const SecondRoute = () => (
<View style={[styles.scene, { backgroundColor: '#673ab7' }]} />
);

const initialLayout = { width: Dimensions.get('window').width };

export default function TabViewExample() {
const [index, setIndex] = React.useState(0);
const [routes] = React.useState([
{ key: 'first', title: 'First' },
{ key: 'second', title: 'Second' },
]);

const renderScene = SceneMap({
first: FirstRoute,
second: SecondRoute,
});

return (
<TabView
navigationState={{ index, routes }}
renderScene={renderScene}
onIndexChange={setIndex}
initialLayout={initialLayout}
/>
);
}

const styles = StyleSheet.create({
scene: {
flex: 1,
},
});
我该如何解决这个问题?
npm version is 6.14.4
React-native version is 0.62.2
react-native-tab-view: "^2.15.0"
react-native-gesture-handler: "^1.6.1"
react-native-reanimated: "^1.10.1"
@react-native-community/masked-view: "^0.1.10"

最佳答案

关于react-native - 类型错误 : null is not an object (evaluating '_ReanimatedModule.default.createNode' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63190006/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com