react-native-activity-feed icon indicating copy to clipboard operation
react-native-activity-feed copied to clipboard

How to implement 'mark read' in React Native

Open fawwaz opened this issue 4 years ago • 0 comments

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-feed or expo-activity-feed version: npm list --pattern <package-name>/yarn list --pattern <package-name>1.0.1
  • getstream version: npm list --pattern getstream/yarn list --pattern getstream 7.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:

  1. 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.

fawwaz avatar Jun 13 '21 15:06 fawwaz