【发布时间】:2018-12-15 23:47:15
【问题描述】:
我需要在通知铃中显示来自 firebase 的未读消息数。 我已完成在我的 Web 应用程序中显示我收藏中的所有内容。但是当有新消息到达时,我需要通过在通知铃中显示未读消息计数来向用户提供反馈。据我了解,为此我需要设置一个firebase 集合中的已读/未读状态。有没有其他方法可以在我的 React Web 应用程序中显示未读消息的计数?
我正在使用 npm 的 firebase 包来显示消息。
以下是我的 firebase 集合中的示例数据。
name:"John Doe",
message:"you got a new appointment"
我是新手 firebase。请帮助我解决这个问题。
【问题讨论】:
标签: reactjs firebase firebase-realtime-database notifications