Request-scoped data loading
Components load their own data, but the same user is only queried once per request: a small loader on this remembers what it has loaded.
The page below asks for the same four users 17 times: the header, every activity and every team member each load the user they show. The loader keeps the promise of each query, so later calls for the same user share it. A higher-order component, withLoader, wraps the page and creates the loader on this for each request, so visitors never share data and nothing goes stale. Async components render one after another, so every query saved also saves time.
Activity
- Grace opened issue #42: “Stream the sidebar, too”
- Ada commented on #42
- Linus merged pull request #41
- Grace closed issue #39
- Ada pushed 3 commits to main
- Margaret approved the release plan
- Linus commented on #42
- Grace tagged release 2.4.0
- Queries
- 4
- Waiting for the database
- 241 ms
users #1users #2users #3users #4