lit / lit/lit.dev

[doc] Add example of component composition / data passing best practices

Open
#1,221 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

Suggested by a new user on discord.
We have https://lit.dev/docs/composition/component-composition/#passing-data-up-and-down-the-tree but it doesn't have any code examples.
We also have https://lit.dev/playground/#sample=examples/element-composition but doesn't have any data passing.

It would be good to add a playground example with data passing and link it from the doc above.

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 component-composition documentation section on passing data and the existing playground entry at examples/element-composition. Add a playground example showing data passing through composed components, then link it from the documentation section; the work is done when both the example and its documentation link are available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
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.