CSS-in-JS not recommended in React 18. What are you using?

This page summarizes the projects mentioned and recommended in the original post on /r/reactjs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • vanilla-extract

    Zero-runtime Stylesheets-in-TypeScript

  • I think Chakra, and Stitches have the same issue outlined in the discussion. They use emotion (as far as I remember) under the hood. If you're happy with tailwind I'd probably use it, and maybe combine with react-aria or headlessUI to build my own design system components, it's worth it in the long run, and not that hard with those libraries to assist you. Alternatively, I believe vanilla-extract is similar to what they've recommended in the discussion when they referenced compile-time tools.

  • react-18

    Workgroup for React 18 release.

  • I recently started looking at Stitches as I'm working on a much bigger project now and I was concerned with the overhead. I was reading that actually Stitches has a very uncertain future and looking through the GitHub, it seems the future of many CSS-in-JS frameworks are up for question: https://github.com/reactwg/react-18/discussions/110

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • cva

    Class Variance Authority

  • For variants, or any use of Tailwind/utility CSS really, maybe you should have a look at https://github.com/joe-bell/cva and https://github.com/slicknode/stylemapper

  • stylemapper

    Flexible utility to create styled and type-safe React components

  • For variants, or any use of Tailwind/utility CSS really, maybe you should have a look at https://github.com/joe-bell/cva and https://github.com/slicknode/stylemapper

  • react-sfc-swyx

  • I dream of pasting my styles inside tags, just like Vue does. Unfortunately this idea never took off with React.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts