NodeList
The NodeList component is a wrapper around the nodeListStore. It renders the node list data and handles the loading state.
Props
path- RealtimeDB referencestartWith- (optional) initial value to use before the collection is fetched
Slots
default- The node list dataloading- Loading state
Slot Props
data- An array of nodesref- The Database node referencertdb- The Database instancecount- The number of nodes returned by the query
Example
<script> import { NodeList } from 'sveltefire'; </script> <NodeList path={'posts'} let:data let:count> <p>Found {count} posts</p> {#each data as post} <p>{post.title}</p> {/each} <p slot="loading">Loading...</p> </NodeList>