sveltejs / sveltejs/kit

docs: update `query` refresh/update sections

Open
#14,675 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem
Unify expressions

Same goal, different terms. Maybe they can be unified to Updating Queries?

Provide reference

The command section shows both

but the latter is not linked to its source for easy reference.

It just says 'as before', so I had to search for the override keyword in the page.

...or when we call it:

await addLike(item.id).updates(getLikes(item.id));

As before, we can use withOverride for optimistic updates:

await addLike(item.id).updates(
  getLikes(item.id).withOverride((n) => n + 1)
);
Describe the proposed solution

Alongside the above edits,

  • Don't assume that a reader read the docs in order
  • Separate each remote functions into independent pages
  • Or at least show the parent section name

I cannot know that I am in a command section in a narrow viewport. The situation is not much different in a wider viewport, since I have to look at the right sidebar to monitor which section I am in.

Image
Alternatives considered

No response

Importance

nice to have

Additional Information

No response

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.

Research direction

Start with the SvelteKit remote-functions documentation, especially the Query, Form, and Command sections and the refresh, updates, withOverride, and enhance references. Compare their terminology and links, then make the sections understandable without prior reading; done means the related source is linked and the parent section remains clear in narrow view.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.