<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haidar Ezio</title>
    <description>The latest articles on DEV Community by Haidar Ezio (@haidar_ezio).</description>
    <link>https://dev.to/haidar_ezio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F438903%2F11713fd5-fedb-4faa-87a3-08f1831b33d4.jpg</url>
      <title>DEV Community: Haidar Ezio</title>
      <link>https://dev.to/haidar_ezio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haidar_ezio"/>
    <language>en</language>
    <item>
      <title>Don't use create-react-app anymore, try these instead</title>
      <dc:creator>Haidar Ezio</dc:creator>
      <pubDate>Sat, 25 Mar 2023 21:37:14 +0000</pubDate>
      <link>https://dev.to/haidar_ezio/dont-use-create-react-app-anymore-try-these-instead-ack</link>
      <guid>https://dev.to/haidar_ezio/dont-use-create-react-app-anymore-try-these-instead-ack</guid>
      <description>&lt;p&gt;It feels like yesterday when we used &lt;code&gt;create-react-app&lt;/code&gt;, but as time passed, its cons have outweighed its pros and we have to look for alternate solutions. Thankfully, alternatives exist and we're going to go through the most popular ones and their use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Simple React app? =&amp;gt; &lt;code&gt;npm create vite@latest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React app + backend + routing + SSG/SSR? =&amp;gt; &lt;code&gt;npx create-next-app@latest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type-safe, Full-stack Next.js app? =&amp;gt; &lt;code&gt;npx create-t3-app@latest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next.js alternative only for SSR? =&amp;gt; &lt;code&gt;npx create-remix@latest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Monorepo?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;'Blazingly fast' build system? =&amp;gt; &lt;code&gt;npx create-turbo@latest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Different monorepo styles all in the CLI? =&amp;gt; &lt;code&gt;npx create-nx-workspace&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;template/starter repo using T3 stack with turborepo? =&amp;gt; &lt;a href="https://github.com/t3-oss/create-t3-turbo"&gt;clone here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;T3 stack + React-native + Tamagui? =&amp;gt; &lt;code&gt;npx create-t3-universal-app&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://vitejs.dev/"&gt;Vite&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;let’s get the obvious choice out of the way, if you want a simple react app, with faster build times and hot module reloading (HMR), &lt;code&gt;create vite&lt;/code&gt; is your best choice here, you can choose from a different set of frameworks other than react as well as using Typescript if you want&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dL6ytoY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oh96209i91d7lt9a7q3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dL6ytoY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oh96209i91d7lt9a7q3.gif" alt="Terminal animation" width="880" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;the second and recommended choice is of course &lt;code&gt;create-next-app&lt;/code&gt;, next.js is the leading full-stack web framework, and for good reason too, batteries are included, so Routing, server-side rendering (SSR), and static site generation (SSG) are all included with no extra packages (unlike react which you’ll have to install react-router for it to work)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lHdmEh-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzlloe98s8cvosbkuhlf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lHdmEh-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzlloe98s8cvosbkuhlf.gif" alt="Terminal animation" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://create.t3.gg/"&gt;T3&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;and if you’ve been on Twitter or youtube these past months, I’m sure you’ve heard about &lt;code&gt;create-t3-app&lt;/code&gt;, an Interactive CLI to build a full-stack, type-safe Next.js app (which by extension means a react app, but I digress)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tyVWftwd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jsglf31dm67ekjj7uvuw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tyVWftwd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jsglf31dm67ekjj7uvuw.gif" alt="Terminal animation" width="880" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it’s an opinionated project that might not suit everyone, since it focuses mainly on full-stack type-safety, so if you’re using any backend that’s not Typescript, like Golang, Rust, or Python, this won’t be for you, it also comes with optional packages that make up the full-stack development (styling, authentication etc...)&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://remix.run/"&gt;Remix&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Remix is a full-stack react framework just like next.js, its main difference is that it focuses more on server-side rendering whereas next.js also supports static site generation (SSG) and incremental site regeneration (ISR), but trust me, you’ll love the CLI when setting up a remix project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RU86JCuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/camub7jr1wwdanks0hry.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RU86JCuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/camub7jr1wwdanks0hry.gif" alt="Terminal animation" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Monorepos:
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(for the uninitiated, A Monorepo is a collection of many different apps and packages in a single codebase, where you use the same styling, same testing kit etc, which for example, you can use to build a react app and its mobile counterpart with react native in the same codebase)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Monorepos are trending in the sense that devs love standardization in their cross-platform apps, or testing reusable logic when working on microservices, and these are a couple of CLIs you'll love using&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://turbo.build/repo"&gt;Turborepo&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;let’s talk about the new kid here, Turborepo, it’s fast, it’s new, and it’s opinionated, its CLI builds a preconfigured repo that might not suit your exact needs for now, but they provide different example projects on github for different needs&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XeUdcfkI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe3czasyrbz3onbmux4a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XeUdcfkI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe3czasyrbz3onbmux4a.gif" alt="Terminal animation" width="880" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://nx.dev/"&gt;NX&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Nx is a build system tool that has a powerful CLI to use for different use cases, and it’s amazing when initiating a large-scale monorepo as it has support for multiple styling systems and multiple frameworks, so no need to configure your apps afterwards&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g_mC618c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fzrwe2z319m6nn0fpmd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g_mC618c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fzrwe2z319m6nn0fpmd.gif" alt="Terminal animation" width="880" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/t3-oss/create-t3-turbo"&gt;create-t3-turbo&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;we also have a template/starter repo that uses Turborepo for a monorepo structure, and adds Expo and react-native to handle the mobile version of your site, making it a true monorepo version of the &lt;code&gt;create-t3-app&lt;/code&gt; we talked about before&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pU6sq6Pv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hb4qpwf5255o5ik6y2q9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pU6sq6Pv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hb4qpwf5255o5ik6y2q9.png" alt="Github link" width="880" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/chen-rn/CUA"&gt;CUA&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Last one I wanted to show you is &lt;code&gt;create-universal-app&lt;/code&gt;, it’s a template just like the previous one, and it actually uses it as a base, it’s an opinionated template for creating full-stack universal (mobile + web codeshare) apps with built-in auth for both of them using T3 stack and the new &lt;strong&gt;Tamagui&lt;/strong&gt; kit that you should totally check out, for a truly universal, Monorepo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9FskHcsM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43mqiocsc81us73gft11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9FskHcsM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43mqiocsc81us73gft11.png" alt="Github link" width="880" height="606"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;hopefully, you’ll be using the CLI/starter repo that suits your needs in your new projects!&lt;/p&gt;

&lt;p&gt;if you liked this article, let me know what type of subjects you want me to check out and visualize, and also next week I'll be discussing Next.js 13 and Server components, so hopefully, that'll be a bit more interesting&lt;/p&gt;

&lt;p&gt;follow me at &lt;a href="https://twitter.com/haidar_ezio"&gt;twitter&lt;/a&gt; for more updates and other stuff I'll be posting there!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Top CSS-In-JS libraries, Compared</title>
      <dc:creator>Haidar Ezio</dc:creator>
      <pubDate>Tue, 28 Feb 2023 23:09:10 +0000</pubDate>
      <link>https://dev.to/haidar_ezio/top-css-in-js-libraries-compared-2o14</link>
      <guid>https://dev.to/haidar_ezio/top-css-in-js-libraries-compared-2o14</guid>
      <description>&lt;p&gt;of course, this is in no way a full showcase of each library and its features, but a more high-level understanding of the syntax and big features&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;all 4 libraries are good in their own way, and some work in certain situations better than others (in my opinion of course 😉):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;use &lt;code&gt;emotion&lt;/code&gt; instead of &lt;code&gt;styled-components&lt;/code&gt;, use it to isolate your styling from your logic, works well on small and medium projects, and &lt;em&gt;larger projects with proper config&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use &lt;code&gt;twin.macro&lt;/code&gt; if you love tailwind and want to &lt;strong&gt;detach the inline styling&lt;/strong&gt; from your components&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use &lt;code&gt;stitches&lt;/code&gt; for making a typesafe and scalable design system, works well on medium to large projects  (can't recommend it since it's not maintained anymore)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;stick around if you want a more in-depth walkthrough on these libraries and how you'd be using them!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://styled-components.com/"&gt;Styled-Components&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;SC is &lt;a href="https://npmtrends.com/@emotion/react-vs-@stitches/react-vs-styled-components-vs-twin.macro"&gt;the most popular CSS-in-JS library&lt;/a&gt; here, and for good reasons, it makes it easy to build reusable styled elements (without naming collisions) and extend each element to add other variants of that element, making it super easy to build up a Design system,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---KFX1bNv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7hp1tg4jkx9ejq1ef0d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---KFX1bNv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7hp1tg4jkx9ejq1ef0d.jpg" alt="styled-components syntax" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you can also add the CSS only without making a new component for it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--te4Cve5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od4kj6xisfcpc8mbkr3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--te4Cve5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od4kj6xisfcpc8mbkr3f.png" alt="styled-components with css prop syntax" width="880" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it keeps the components readable and detached from the logic of the app&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fM7mCN_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1729eaoeg520s91flgm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fM7mCN_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1729eaoeg520s91flgm.png" alt="isolated component and styling" width="722" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and it allows for dynamic styling based on the component's props and state!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oRfyq718--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywt072u6cn9xcg3qe5xp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oRfyq718--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywt072u6cn9xcg3qe5xp.gif" alt="animation for updating the button color" width="853" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Framework Agnostic - supported in a lot of other libraries - Ease of use&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Naming components is hard 🙄 - Performance (compared to Emotion)- Debugging&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://emotion.sh/docs/introduction"&gt;Emotion&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Emotion&lt;/code&gt; is heavily inspired by &lt;code&gt;styled-components&lt;/code&gt; and It has almost the same features of styled-components, the syntax is identical too&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ST3b69DS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7qpxqbdjdc4ohfq9lmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ST3b69DS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7qpxqbdjdc4ohfq9lmn.png" alt="emotion syntax" width="880" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;aside from some differences in using the &lt;code&gt;CSS&lt;/code&gt; prop, and being much more performant with a smaller bundle size&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fbK55TEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oe3pha7h5yhrmmpxicu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fbK55TEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oe3pha7h5yhrmmpxicu.png" alt="emotion css prop syntax" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same as &lt;code&gt;styled-components&lt;/code&gt; - Performance is better - smaller bundle size than &lt;code&gt;styled-components&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Naming components (again) 😅- Debugging - Community support isn’t as large as &lt;code&gt;styled-components&lt;/code&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://stitches.dev/"&gt;Stitches&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;this is where it gets interesting, &lt;code&gt;stitches&lt;/code&gt; has a smaller bundle size than &lt;code&gt;emotion&lt;/code&gt;, and has a near-zero runtime 🤯, the biggest difference here is that &lt;code&gt;stitches&lt;/code&gt; uses Object style syntax to achieve that zero runtime&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yxGi9KgO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g1y09aj2yd3ye713i6jt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yxGi9KgO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g1y09aj2yd3ye713i6jt.png" alt="stitches syntax" width="880" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Stitches&lt;/code&gt; doesn’t have &lt;strong&gt;Prop Interpolation,&lt;/strong&gt; but has a Variants concept that’s more flexible and cleaner compared to &lt;code&gt;styled-components&lt;/code&gt;/&lt;code&gt;emotion&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--El4LVEBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3siwq1zi7jysymvx4aq2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--El4LVEBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3siwq1zi7jysymvx4aq2.png" alt="emotion and styled-components vs stitches syntax" width="880" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;another great feature is that &lt;code&gt;stitches&lt;/code&gt; is built with Typescript in mind, so it’s type-safe and you’ll have autocompletion with it too!&lt;/p&gt;

&lt;p&gt;UI components like &lt;a href="https://www.radix-ui.com/"&gt;Radix&lt;/a&gt;  and &lt;a href="https://nextui.org/"&gt;NextUI&lt;/a&gt; use it under the hood (although NextUI is transitioning to something else as of the time of this writing since &lt;code&gt;stitches&lt;/code&gt; is no longer maintainable)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Performance - type-safety - zero runtime - Bundle size&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Can be overwhelming for small projects - transitioning from Emotion or SC can seem overwhelming - &lt;strong&gt;no longer maintained as of the time of this writing (it doesn't support static extraction yet)&lt;/strong&gt; - community support isn’t as large as the rest&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/ben-rogerson/twin.macro"&gt;twin.macro&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;✨the magic of tailwind with the flexibility of CSS-in-JS ✨&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;who doesn’t love tailwind these days ? it’s a great solution for css but it can muddy your code quickly, and that’s a turn off for some people, but with &lt;code&gt;twin.macro&lt;/code&gt;, you’ll be using tailwind syntax instead of normal css&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A9VYT2Cb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyzzgblqziodw9dkl692.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9VYT2Cb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyzzgblqziodw9dkl692.png" alt="twin.macro syntax" width="880" height="615"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(it’s a babel macro basically, so doesn’t add any additional size), twin macro can be added to the previous 3 CSS-in-JS libs, and you can use normal css too for stuff that tailwind doesn’t support yet (like with grid, animation etc..)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HJ6q5oHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qaihg3w26w6c7yxpjrgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HJ6q5oHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qaihg3w26w6c7yxpjrgw.png" alt="twin.macro used with the previous libraries" width="880" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(the issue with it was that it used a babel macro, and that turns off SWC in Next.js, but &lt;a href="https://github.com/ben-rogerson/twin.examples/tree/master/next-stitches-typescript"&gt;they’ve fixed the issue now&lt;/a&gt; !)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tailwind syntax 🥳 - supports most CSS-in-JS libraries - and takes any pros from the library you chose to inject it in ;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Can be a bit overwhelming to setup (mainly for next.js &amp;amp; stitches)- and takes the cons from the library you chose&lt;/p&gt;




&lt;p&gt;and with that we've taken a look at these 4 libraries and how they compare to one another, hope you guys like this one, it's my first one and i've had a blast animating this, next time i'll touch on the new ways to create-react-app&lt;/p&gt;

&lt;p&gt;if you have any questions just let me know, and follow me on &lt;a href="https://twitter.com/haidar_ezio"&gt;twitter&lt;/a&gt; for more updates and minified version of these articles ;)&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
