vuetifyjs / vuetifyjs/vuetify

Shared composable state for extended components

Open
#21,732 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C: VAppBar C: VAutocomplete C: VCombobox C: VSelect C: VTreeview performance T: enhancement
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Wasted work doing the same thing twice:

  • VTreeview calls useListItems then it passes props.items to VList which calls useListItems again
  • VSelect has its own selection logic but uses VList which does mostly the same thing in nested

Accessing state from child components in render, these all rely on the child being rendered before they can get values from the ref which means multiple re-renders:

  • VTreeview uses children and getPath from nested through VList
  • VTreeviewItem uses state from useLink and useNestedItem through VListItem
  • VAppbar uses state from its VToolbar

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 by tracing the named components and composables: VTreeview, VList, VSelect, VTreeviewItem, VAppbar, useListItems, useLink, and useNestedItem. Determine how shared state could avoid duplicate work and render-order-dependent re-renders; done means the affected components share the relevant state without repeated composable work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.