Twitter | Search | |
Chris Bateman
Front-end engineer at , working mainly with . I love the web.
1,504
Tweets
261
Following
295
Followers
Tweets
Chris Bateman Mar 20
Wait did just rewrite Babel, Webpack, ESLint, Jest, and npm all in his spare time
Reply Retweet Like
Chris Bateman Feb 1
Why you still need to have some kind of server render if SEO is important to you - even for Google:
Reply Retweet Like
Chris Bateman Nov 26
It seems like Concurrent React doesn’t render the app at all until the first maxDuration is reached. Am I missing something, or is this just what I get for playing with unstable features?
Reply Retweet Like
Chris Bateman Sep 1
I have high hopes for Linaria - one of the few options that will do static extraction for reusable libraries (not just apps), but it’s got some bugginess
Reply Retweet Like
Chris Bateman Jul 16
Reddit cuts back on styled-components and sees a 30% improvement in mount times: Seems that CSS-in-JS solutions that don’t extract static CSS still aren’t fast enough at scale. I’m surprised that there are so few options there.
Reply Retweet Like
Chris Bateman 30 Jun 18
Replying to @bjankord
It’s already discouraged in the docs, and planned for removal here:
Reply Retweet Like
Chris Bateman 29 Jun 18
True! Not an issue if you’re coming from plain CSS though :)
Reply Retweet Like
Chris Bateman 29 Jun 18
Replying to @kettanaito
*If* the application using the library is implementing styled-component’s SSR API, yes. But it’s not reasonable for a reusable library to require that.
Reply Retweet Like
Chris Bateman 29 Jun 18
Replying to @batemanchris
I say this because it seems like the only reasonable way for a *reusable* component to support server rendering is static extraction of CSS. Emotion doesn’t really work for reusable libraries and they’re dropping static extraction soon anyways
Reply Retweet Like
Chris Bateman 29 Jun 18
If you want CSS-in-JS in a reusable component – without inline styles and with support for server rendering – your best/only option is Linaria Are there any other options I’ve missed?
Reply Retweet Like
Chris Bateman 29 May 18
How bad is it to have getDerivedStateFromProps always return a state value? As opposed to creating a separate memoizable function that checks props
Reply Retweet Like
Chris Bateman retweeted
Dan Abramov 4 Apr 18
I just made this diagram of modern React lifecycle methods. Hope you’ll find it helpful!
Reply Retweet Like
Chris Bateman 24 Jan 18
Whoa, I didn’t think Service Workers would arrive until iOS 12!
Reply Retweet Like
Chris Bateman 22 Jan 18
Replying to @__samrad
Thanks. For whatever it’s worth, I’m using react-loadable like this - - so it doesn’t load the next route until RR is rendering it. I’m thinking there might be a way to make something like RTG work here though
Reply Retweet Like
Chris Bateman 22 Jan 18
Replying to @__samrad
Like using react-transition-group or something like that?
Reply Retweet Like
Chris Bateman 22 Jan 18
Replying to @__samrad
The bigger problem, unfortunately, is figuring out how to prevent the previous route from disappearing immediately
Reply Retweet Like
Chris Bateman 22 Jan 18
Replying to @zt1072
Ah, interesting. I should have specified that I’m wondering about v4 though
Reply Retweet Like
Chris Bateman 22 Jan 18
Has anyone figured out a good way to do this with React Router?
Reply Retweet Like
Chris Bateman 10 Jan 18
Replying to @klamping
You can set a longer line length for Prettier if you’re happy with the left!
Reply Retweet Like
Chris Bateman 2 Jan 18
Emotion might be the first CSS-in-JS solution that checks all the boxes I’m interested in: - Generates external CSS files - Doesn’t need Webpack to do so - Can write actual CSS, rather than objects
Reply Retweet Like