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

Nav-frontend pakker støtter nå React v17 #979

Merged
merged 11 commits into from
Feb 5, 2021
Merged

Conversation

KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented Feb 4, 2021

  • nav-frontend-* pakker har nå peer og devDep: react: ^16.8.0 || ^17.0.0
  • Website (gatsby build) bruker også React v17 nå
  • Fjernet React som dependency fra stilpakker

Motivasjon

  • Brukere av React v17 slipper warnings i terminal for hver komponent fra designsystemet.
  • "Minstekrav" i peerDep for React er satt til v16.8. Komponentene skal fungere helt fint akkurat nå med bare v16.0, men motiverer brukerene til å oppgradere React til å støtte hooks i det minste.
  • Mindre støy i terminalen

Sideffects

  • Modal, ekspanderbartpanel og tabs ble oppdatert for å støtte React v17 (Måtte bare ta i bruk constructor())
  • Satt webpack build for stilpakker til mode=production (default, men terminal klager ikke lengre)
  • Satt webpack build til å være errors-only for mindre støy i terminal
  • Satt svgr til å være silent for mindre støy

@KenAJoh KenAJoh requested a review from a team as a code owner February 4, 2021 16:27
andnorda
andnorda previously approved these changes Feb 5, 2021
Copy link
Collaborator

@andnorda andnorda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsker dennen endringen! Bra jobba! ❤️❤️❤️

};
constructor(props) {
super(props);
this.state = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er det ikke lov med state = {} rett på klassen i React 17?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er fortsatt lovt til det virker det som, men react klasse uten constructor var problemet. Klaget da på at implicit props spread ikke var lovt

@andnorda andnorda merged commit 09b0dcd into master Feb 5, 2021
@andnorda andnorda deleted the reactv17-update-3 branch February 5, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants