File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ const avgScoreForUser =
4949The Aggregate component provides ` O(log(n)) ` -time lookups, instead of the ` O(n) `
5050that would result from naive usage of ` .collect() ` in Convex or ` COUNT(*) ` in MySQL or Postgres.
5151
52+ ## Examples
53+
5254## What are Aggregates for?
5355
5456With plain Convex indexes, you can insert new documents and you can paginate
@@ -149,6 +151,8 @@ The Aggregate component can efficiently calculate all of these:
149151 where each page has 50 photos.
150152- [ Random access] ( #total-count-and-randomization ) : Look up a random song in a playlist, as the next song to play.
151153
154+ Try it out: https://aggregate-component-example.netlify.app/
155+
152156## Pre-requisite: Convex
153157
154158You'll need an existing Convex project to use the component.
@@ -299,6 +303,8 @@ To run the examples:
2993034 . The dashboard should open and you can run functions like
300304 ` leaderboard:addScore ` and ` leaderboard:userAverageScore ` .
301305
306+ Or play with them online at: https://aggregate-component-example.netlify.app/
307+
302308### Total Count and Randomization
303309
304310If you don't need the ordering, partitioning, or summing behavior of
Original file line number Diff line number Diff line change 11# Example App
22
3+ You can try out the examples online at: https://aggregate-component-example.netlify.app/
4+
35## To run the examples
46
57Once you have cloned this repo, ** from the root of the repo** :
Original file line number Diff line number Diff line change 1+ /* /index.html 200
2+
You can’t perform that action at this time.
0 commit comments