rakannimer / react-firebase

🔥Declarative React bindings for Firebase Auth & Realtime Database.

Home Page:https://react-firebase-js.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FirebaseDatabaseNode should use its callback when the data at its path gets deleted

brytonmoeller opened this issue · comments

Same problem. Callback isn't called when the value in the database becomes null.

return (
  <FirebaseDatabaseNode
    path={path}
  >
    {(res) => {
      console.log(res)
      return <div>{JSON.stringify(res.value)}</div>
    }}
  </FirebaseDatabaseNode>
)

console.log isn't called when the value becomes null, and the component doesn't rerender