Render error: Couldn't find a navigation context
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js, react-native
- Lĩnh vực
- mobile
Hướng nghiên cứu
Điểm vào có thể tái hiện là App tối thiểu với NavigationContainer, Tab.Navigator, Feed và StreamApp được hiển thị trong issue. Chạy nó trên Android với các phiên bản Expo và Node đã nêu, sau đó theo dõi cách FlatFeed và các component con của nó sử dụng ngữ cảnh điều hướng bên trong tab navigator. Công việc được xem là hoàn tất khi feed render trong thiết lập điều hướng đó mà không gặp lỗi đã báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I get this error:
"Render Error: Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'?"
I noticed that this issue appears whenever a Stream Flatfeed is inside a navigation container. When the feed is on its own (not part of any stack/tab navigation), it renders correctly. I am testing on Android using Node v16.13.1 and Expo v44.
Any tips on this?
I was able to reproduce this issue on a smaller app:
import React, { Fragment } from 'react';
import { Text, View } from 'react-native';
import SafeAreaView from 'react-native-safe-area-view';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { NavigationContainer } from '@react-navigation/native';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import { StreamApp, FlatFeed, Activity, LikeButton, StatusUpdateForm, ReactionIconBar} from 'expo-activity-feed';
const Tab = createMaterialTopTabNavigator();
function Feed() {
return (
<View style={{ flex: 1 }}>
<StreamApp
apiKey={apiKey}
appId={appId}
token={token}>
<FlatFeed
Activity={props => (
<Fragment>
<Activity
{...props}
Footer={
<ReactionIconBar>
<LikeButton {...props} />
</ReactionIconBar>
}
/>
</Fragment>)} notify/>
<StatusUpdateForm feedGroup='timeline' />
</StreamApp>
</View>
)
}
function Screen2() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Screen 2</Text>
</View>
);
}
export default App = () => {
return (
<SafeAreaProvider>
<SafeAreaView style={{ flex: 1 }}>
<NavigationContainer>
<Tab.Navigator
screenOptions={{
tabBarLabelStyle: { fontSize: 12 },
tabBarItemStyle: { width: 100 },
}}>
<Tab.Screen name="Feed" component={ Feed } />
<Tab.Screen name="Screen2" component={ Screen2 } />
</Tab.Navigator>
</NavigationContainer>
</SafeAreaView>
</SafeAreaProvider>
);
};
- Ngôn ngữ chính
- JavaScript
- Star
- 339
- Fork
- 193
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GetStream/react-native-example
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
GetStream/react-native-example#45 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
GetStream/react-native-example#39 · 2 bình luận ·
-
GetStream/react-native-example#38 · 11 bình luận · 10 reaction · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
GetStream/react-native-example#35 · 1 bình luận ·
-
How to customize stream app ? Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của GetStream/react-native-example
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
palladius/rails8-app-on-gcp#145 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotenvx/dotenv-vscode#139 ·
-
test-change-proposal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
web-platform-tests/interop#1455 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
corsairdev/corsair#1764 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100