joshwcomeau/guppy

Upgrade to `styled-components` v4

Aperta

#213 aperta il 5 set 2018

 (6 commenti) (5 reazioni) (1 assegnatario)JavaScript (151 fork)github user discovery
code healthgood first issue

Metriche repository

Star
 (3240 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

styled-components v4 was just announced, and it looks really good:

  • 25% faster on mount
  • really good new APIs like the new global styles, and as
  • ref support
  • faster styled()
  • a bunch more

It's still in beta, but I think we should try upgrading. It seems like it'd be a huge improvement.

Some things that will need to be updated:

  • We use injectGlobal in a few places, needs to switch to the new global API
  • use ref instead of innerRef in a few places
  • use styled() instead of .extend
  • For the Heading component, we can use the new as prop, instead of withComponent

This would be a great first issue for new contributors :) would give you a tour of the React codebase, without being too hairy.

Guida contributor