guppy icon indicating copy to clipboard operation
guppy copied to clipboard

Upgrade to `styled-components` v4

Open joshwcomeau opened this issue 6 years ago • 6 comments

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.

joshwcomeau avatar Sep 05 '18 11:09 joshwcomeau

Hey @joshwcomeau this seems like a good issue for me to get around the main react codebase of guppy and also experiment with the v4 of styled-components :D. If possible i would like to try and tackle this one :)

rfbotto avatar Sep 05 '18 18:09 rfbotto

All yours, @rfbotto!

superhawk610 avatar Sep 05 '18 18:09 superhawk610

Sounds good @rfbotto!

joshwcomeau avatar Sep 05 '18 22:09 joshwcomeau

Hi @rfbotto,

Just a quick check-in to see how this is going. No rush at all :) just making sure you're still interested / aren't stuck on something

joshwcomeau avatar Sep 23 '18 13:09 joshwcomeau

Hey @joshwcomeau!

Yes, i'm still very interested! :) Was planning to start after requesting the issue but ended up not having a lot of opportunities these last few weeks. Will start to tackle in the next few days, if that's okay :) And sorry for the delay on the issue situation, next time will keep you posted through Gitter, so you know if something is up.

rfbotto avatar Sep 23 '18 18:09 rfbotto

Hi @rfbotto,

Perfect! Yeah, this isn't urgent :) no problem at all on the delay.

I think if you don't finish it in the next couple weeks it'd be worth just giving us a status update, here or on Gitter, but zero pressure for anything else :D

joshwcomeau avatar Sep 23 '18 20:09 joshwcomeau