Prop drilling strategy #6242
alionazherdetska
announced in
Architecture Decisions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Components that re-use other components internally create prop drilling scenarios where parent components must accept and forward props they don't directly use. We evaluated three approaches to address this architectural challenge:
Composition (current solution)
- using slots and component compositionStore
- global state management using Stencil StoreContext
- scoped context for child components (not available in Stencil)Decision
Maintain composition as the default approach for the majority of components. Use store only for components that require configuration.
Guidelines
Default approach: keep composition (current solution) for most components
Configuration-heavy components: use store for components like configurable header and footer that need shared configuration
Beta Was this translation helpful? Give feedback.
All reactions