Skip to content

Instantly share code, notes, and snippets.

View avinashlng1080's full-sized avatar

Avinash Lingaloo avinashlng1080

View GitHub Profile
@avinashlng1080
avinashlng1080 / tutorial_storage_layer.md
Created July 22, 2021 09:20
Tutorials - Storage Layer

findAndObserve: Be aware that findAndObserve may throw an error if the ‘id’ it is looking for does not exist in the database. Always ensure that you are using this method in a safe way.

withObservables:

2nd level query or “A query in a query” export const withSystemIds = withObservables([], ({database}) => ({ currentChannelId: database.collections.get(SYSTEM).findAndObserve(SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID),