designsystemet
designsystemet copied to clipboard
How do we solve interconnected component props?
Work in progress writing description, but will outline different approaches we have tried and potential other ways of solving inter-connected component props in React.
-
.Root
-
.Context
- "Hooks" instead of
Context
, like react-aria useTextfield
Notes:
- Should our othermost
.Context
represent the component context or something else? - Can we get away without using React Context?
-
.Context
is used in two different way currently. - https://github.com/digdir/designsystemet/pull/2432#pullrequestreview-2312554652
- https://designsystemet.slack.com/archives/C07K7NEKXEW/p1726656413211339