【问题标题】:How to connect firebase database with react js Todo App in ES6如何在 ES6 中将 Firebase 数据库与 React js Todo App 连接起来
【发布时间】:2017-07-25 06:16:02
【问题描述】:

在 ES6 中反应 js 如何将我的组件与 firebase 数据库链接

【问题讨论】:

  • 你在使用 Redux 吗?

标签: reactjs firebase-realtime-database


【解决方案1】:

您可以使用reactfire。请参阅快速入门指南here

另外,请参阅以下由 Stephen Grider 撰写的关于此主题的 Rally Coding 视频:Combining Redux and Firebase。他解释了如何在不使用 reactfire 的情况下将 Redux 与 Firebase 一起使用,作为替代设置。

【讨论】:

    【解决方案2】:

    您可以使用 re-base - https://github.com/tylermcginnis/re-base(简单的方法)
    要么
    (困难的方法)按照https://firebase.google.com/docs/database/web/read-and-write 将组件状态中的每个项目绑定到 snapshot.val()
    我一开始是从 re-base 开始的,现在想弄清楚如何在没有它的情况下做到这一点。

    【讨论】:

      猜你喜欢
      • 2021-11-11
      • 1970-01-01
      • 2021-06-04
      • 2023-01-25
      • 2020-05-17
      • 1970-01-01
      • 2015-06-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多