rakannimer/react-firebase

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

brytonmoeller opened this issue · 1 comments

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

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