react-native-activity-feed
react-native-activity-feed copied to clipboard
How to implement 'mark read' in React Native
Setup (always fill this in):
- iOS or Android? Android
- Expo or regular React Native? Regular React Native
- React Native Version:0.63.3
react-native-activity-feedorexpo-activity-feedversion:npm list --pattern <package-name>/yarn list --pattern <package-name>1.0.1getstreamversion:npm list --pattern getstream/yarn list --pattern getstream7.1.1
Describe the bug
Not really a bug, but a question how can we implement unread count in react native ? Based on my understanding on the docs, in order to set the notification status, we need to access client object directly. However I didn't see any react native example which use plain client object directly. All other example always using Abstracted Component.
Even if I access the client object through StreamAppConsumer, how can / how should I put it in the react component so it won't over/under called ?
To Reproduce Steps to reproduce the behavior:
- Create a mark read feature in react Native.
Expected behavior It should include a higher order component to use 'read notification' counter
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.