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
functioncreateObservableUser(dbUserRecord){returnfromResource((sink)=>{// sink the current statesink(dbUserRecord.fields)// subscribe to the record, invoke the sink callback whenever new data arrivesconstsubscription=dbUserRecord.onUpdated(()=>{sink(dbUserRecord.fields)})return()=>{// the user observable is not in use at the moment, unsubscribe (for now)dbUserRecord.unsubscribe(subscription)}},)}
This way we can avoid relying on storing the state outside, making it easier to use.
The text was updated successfully, but these errors were encountered:
For example, the code in the README would be:
This way we can avoid relying on storing the state outside, making it easier to use.
The text was updated successfully, but these errors were encountered: