GetStream / react-native-activity-feed

Official React Native SDK for Activity Feeds
https://getstream.io/
200 stars 88 forks source link

<FlatFeed /> is not working in the <NavigationContainer> due to Expo and @react-navigation/native-stack version issue. #244

Open rushabhOrdex opened 2 years ago

rushabhOrdex commented 2 years ago

Describe the bug Currently, we are using with StackNavigator When we add to App.js It Throw error as below. My Expo version is:- 43.0.2

Error: Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? 
See https://reactnavigation.org/docs/getting-started for setup instructions.

If I remove NavigationContainer then FlatFeed loads in-app but I need it for routing.

When I tried same application with below Expo Version and Expo dependencies version it is working.

Note:- It is not working with @react-navigation/native-stack I had to use @react-navigation/stack package to have the Stack Navigation.

So, is the Expo 43.0.2 is not compatible with the getstream and <FlatFeed /> to use them inside <NavigationContainer>? If that is the case do we need to downgrade Expo version and dependencies of it? Please advise.

zhani-tegeria commented 2 years ago

bump

sicsol commented 2 years ago

downgrading to version 1.1.0 works on Expo 44 make sure your package.json isn't including 1.1.1 also remove the ^ if it's there to force it to use the 1.1.0 version

calebpanza commented 2 years ago

Any movement on this? Has anyone identified the issue enough to where the community could patch this? Seems kinda silly to have to downgrade the version in order to get this to work considering that the main functionality of the package is to integrate with Stream's API. We handle our own Navigation on our end....

cody-t-minus commented 2 years ago

I'm not sure if anybody is working on this, but over here we decided to eject from Expo, build our own components to display the list of activities, and handle getting feeds/activities with a custom web Api. Maybe this will be handled in a future version of GetStream? 🤷

calebpanza commented 2 years ago

Yeah we're actually not using Expo, we're on React Native directly and still running into this issue. We would prefer to not write custom front-end API's for the actual fetching of the activities so that we can put more of our focus and attention on the Activities themselves.

punksta commented 2 years ago

getting this issue on "expo": "^45.0.0" and "expo-activity-feed": "^1.1.1",