You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But how to map that value to props? We could just map the value to the same prop key, which would require an additional check props[key] instanceof Error, or we could extend the mergeProps function to also pass and error argument that the user could map to props as they desire, something like (we could attach the key to the error for convenience):
constmergeProps=(ownProps,firebaseProps,error)=>({error: 'There was an error reading '+error.key+' Firebase said: '+error.message})
The text was updated successfully, but these errors were encountered:
There is currently no way of capturing errors from database reads, for example if permission is denied. We could add a handler to https://github.com/unfold/react-firebase/blob/master/src/connect.js#L106
But how to map that value to props? We could just map the value to the same prop key, which would require an additional check
props[key] instanceof Error
, or we could extend themergeProps
function to also pass anderror
argument that the user could map to props as they desire, something like (we could attach the key to the error for convenience):The text was updated successfully, but these errors were encountered: