lit / lit/lit.dev

Async Tasks docs don't explain what happens if state callbacks are omitted

Open Beginner friendly
#1,463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

See: https://lit.dev/docs/data/task/#rendering-tasks

The page lists the state callbacks, but doesn't explain what happens if a state callback is omitted.

In particular, when the same rendering is desired for `initial` and `pending` state, do both state callbacks need to be defined? And what happens if a callback is omitted.

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

Read the Async Tasks documentation at https://lit.dev/docs/data/task/#rendering-tasks and inspect the existing state-callback descriptions. Confirm what omitted callbacks do, especially whether initial and pending can share rendering without both callbacks, then update that section with the behavior and verify the examples remain accurate.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.