sveltefire icon indicating copy to clipboard operation
sveltefire copied to clipboard

Add Common Use-case Examples

Open codediodeio opened this issue 5 years ago • 3 comments

The documentation should be expanded with common UI patterns.

  • User Auth Methods
  • Collection pagination and queries
  • Common Firestore join patterns

codediodeio avatar Nov 11 '19 19:11 codediodeio

Hey, nice work! Could you add more examples for the the following usecases:

Pagination with appending instead of exchanging an already loaded list. This would be very useful to to build a "load more" or infinite scrolling solution, rather than a page-switch.

Stores to keep already loaded items and don't load anything again on route-change. This would be extremely helpful if you work with a lot of data and if pagination was already fired multiple times. It also decreases the amount of requests you make to Firebase (since it causes costs on scale). Your store example code is really minimal and hard to understand without a "real" example.

Thanks a lot!

kilianso avatar Mar 27 '20 19:03 kilianso

Hey, nice work! Could you add more examples for the the following usecases:

Pagination with appending instead of exchanging an already loaded list. This would be very useful to to build a "load more" or infinite scrolling solution, rather than a page-switch.

Stores to keep already loaded items and don't load anything again on route-change. This would be extremely helpful if you work with a lot of data and if pagination was already fired multiple times. It also decreases the amount of requests you make to Firebase (since it causes costs on scale). Your store example code is really minimal and hard to understand without a "real" example.

Thanks a lot!

so agree with you

zigots007 avatar Apr 30 '20 16:04 zigots007

I'm also interested in getting examples for this. I'm trying to send the data from firestore to an object that can be accessed from all of my component so that you only need to read the data from firebase once. Anyone has an idea how this can be done?

marclorrain avatar Sep 17 '20 01:09 marclorrain