Use initial state for perfomance
@enjeck is already working on this.
Since Jun 30, 2025.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.