Skip to content




The state of Chakra UI & Next 13.4

The state of Chakra UI & Next 13.4

Has Chakra UI's roundtable seat been jeopardised by Next & React's shift to Server Components? Dive into our analysis to see if it still reigns supreme.


We're approaching the renaissance of web development. Or if you've been around the forums on the web... The "PHP Part 2" days. You might be asking why the time is so fraught with discussion and why that awful language (PHP) has been brought up once again.

It's React Server Components. You've potentially heard of them, but here's the basic gist of what's happened. They're the new way of handling client/server-side rendering. Why is this important? Well, let me give you the rule of thumb.

Just use "use client" less Essentially for the purpose of this explanation, everytime a dev uses "use client", a decent chunk of Javascript is passed to the end user. A chunk of javascript is slow to load, and overall the more chunks of javascript get passed, the slower your website will be and the madder the overseer Google will be, and shove you to the bottom of the search results.

What has this got to do with Chakra UI?

Well if you've been following so far, there's probably a good reason that I've filled the exposition of the first two paragraphs with a definition of "use client".

You guessed it. Chakra UI pretty much only works with "use client" and therefore ships a ton of Javascript to the end user. So not good.

Where does this leave us? Well, frankly, there are a couple of solutions how to band-aid fix this. See here. But none of them are actually all that convincing of a solution. So the next best thing is flagging this to the world for anybody considering using Chakra UI, such as ourselves.

"use client" is fine dog

No spam, only good stuff

Subscribe, for more hot takes

Only god knows why anybody would purposefully subscribe themselves to a newsletter that moans about development. These poor souls did though
Profile 1
Profile 2
Profile 3
Profile 4
Profile 5

Our thoughts

We personally reckon this issue will be solved in the coming months, as Next 13.4 (RSC became product-ready) (opens in new tab) has only been out for 18 days. However, if you plan to build something using the Next.js app directory and server components, it would be a safer bet to use Tailwind.css for now.

If you're looking for more in-depth takes and checking on progress, there is a V3.0 roadmap (opens in new tab). Part of that roadmap includes a static way of handling stylings - which, in theory, means you won't have the "use client" issue if they migrate to it. However, we're ultra-cynical at the best of times, so until we see a working prototype, it's probably not something we would rely on seeing the light of day.

EDIT: Found out there's a pretty damn good write-up available here (opens in new tab) from Segun Adebayo himself

Services
$ Next.js development
App router, server components, and Tailwind. Performance-first builds.
>Learn more

Frequently asked questions

Does Chakra UI work with React Server Components?
At the time we wrote this (18 days after Next 13.4 made server components production-ready), Chakra UI pretty much only worked with 'use client', so every Chakra component shipped a chunk of JavaScript to the browser. We found no convincing workaround beyond band-aid fixes.
Why does 'use client' matter for performance?
Every time a developer adds 'use client', a decent chunk of JavaScript is sent to the end user. More chunks mean a slower site, and Google pushes slow sites down the search results. Our rule of thumb is simply to use 'use client' less.
Should I use Chakra UI or Tailwind with the Next.js app router?
Our recommendation at the time was Tailwind CSS as the safer bet for anything built on the Next.js app directory and server components, until Chakra solved its client-only styling problem.
Was Chakra UI planning to fix the server components issue?
The Chakra v3.0 roadmap included a static way of handling styling, which in theory would remove the 'use client' requirement if they migrated to it. We were cynical about relying on that until there was a working prototype, and later linked to a write-up from Segun Adebayo on the subject.
What are React Server Components?
They are the new way of handling client and server-side rendering in React and Next.js, which became production-ready in Next 13.4. The practical upshot is that only components marked 'use client' send JavaScript to the browser, so the less you use it, the faster the site.

About the author

Jono Alford

Founder of Roboto Studio, specializing in headless CMS implementations with Sanity and Next.js. A Sanity Pioneer and first-cohort Sanity Community Ambassador, focused on editorial experiences that help teams ship faster.



Related posts





Get in touch

Tell us what you're building. We reply within one working day. Jono or someone on the team picks up every message personally.

By sending this you agree to our privacy policy. We only use your details to reply.