Skip to content

Shared composable state for extended components #21732

Open
@KaelWD

Description

@KaelWD

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions