nextcloud / nextcloud/tables

Use initial state for perfomance

Open
#1,864 0 comments 0 reactions 1 assignee View on GitHub

@enjeck is already working on this.

Since Jun 30, 2025.

enhancement performance
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

Alternatively since the template list is a static array, the overhead to have an extra request seems rather high, it could be passed in as initial state on the page request

As discussed this might be a good exercise to learn the initial state API we have, could you give that a try in a follow up?

Originally posted by @juliusknorr in https://github.com/nextcloud/tables/issues/1808#issuecomment-2900140898

Example usage

JS dep is @nextcloud/initial-state, https://github.com/nextcloud/tables/blob/main/package.json#L36

In the backend, for example, we use it so far on one place to set the contextId from the backend: https://github.com/nextcloud/tables/blob/main/lib/Controller/PageController.php#L71 (and otherwise just provide the plain index page).

And here is that value loaded in vue: https://github.com/nextcloud/tables/blob/main/src/App.vue#L72

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.