Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we solve interconnected component props? #2453

Closed
mimarz opened this issue Sep 18, 2024 · 5 comments · Fixed by #2782
Closed

How do we solve interconnected component props? #2453

mimarz opened this issue Sep 18, 2024 · 5 comments · Fixed by #2782
Labels
react @digdir/designsystemet-react

Comments

@mimarz
Copy link
Collaborator

mimarz commented Sep 18, 2024

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.

  1. .Root
  2. .Context
  3. "Hooks" instead of Context, like react-aria useTextfield

Notes:

@mimarz mimarz converted this from a draft issue Sep 18, 2024
@mimarz mimarz added the react @digdir/designsystemet-react label Sep 18, 2024
@eirikbacker
Copy link
Contributor

eirikbacker commented Sep 23, 2024

Også relevant: https://designsystemet.slack.com/archives/C07K7NEKXEW/p1726745135430249
...skal vi prøve å unngå useContext helt der mulig?

@mimarz
Copy link
Collaborator Author

mimarz commented Sep 24, 2024

Også relevant: https://designsystemet.slack.com/archives/C07K7NEKXEW/p1726745135430249 ...skal vi prøve å unngå useContext helt der mulig?

Why not both?

Men ja, det var derfor jeg opprettet dette issuet slik at vi kan iterer på .Context tilnærmingen og om den fortsatt føles grei eller ikke.

Da vi snakket om det første gang så trodde jeg vi skulle flytte hele contexten opp til .Context komponenten. Da fikk et tydelig indikasjon på hvor konteksten er og om du ikke bruker den så må du wire-up ting selv + støtte for react server components.

@mimarz mimarz changed the title What is our .Context? How do we support React Context? Sep 24, 2024
@mimarz
Copy link
Collaborator Author

mimarz commented Sep 24, 2024

En annen ting som vi må undersøke er om det finnes komponenter som aldri kommer til å fungere uten React Context og hvordan vi stiller oss til det.

@mimarz mimarz changed the title How do we support React Context? How do we use React Context? Sep 24, 2024
@mimarz mimarz changed the title How do we use React Context? How do we use interconnect props in components? Sep 24, 2024
@mimarz mimarz changed the title How do we use interconnect props in components? How do we solve interconnect props in components? Sep 24, 2024
@mimarz mimarz changed the title How do we solve interconnect props in components? How do we solve interconnect component props? Sep 24, 2024
@mimarz mimarz changed the title How do we solve interconnect component props? How do we solve interconnected component props? Sep 24, 2024
@mimarz
Copy link
Collaborator Author

mimarz commented Sep 25, 2024

Circumstances for this issue can be affected by outcome of #2508

@mimarz
Copy link
Collaborator Author

mimarz commented Oct 15, 2024

Have a look at this after #1943 and #2508

Barsnes added a commit that referenced this issue Nov 15, 2024
resolves #2453

---------

Co-authored-by: Michael Marszalek <[email protected]>
@github-project-automation github-project-automation bot moved this from 📄 Todo to ✅ Done in Team Design System Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react @digdir/designsystemet-react
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants