<?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: Darcy</title>
    <description>The latest articles on DEV Community by Darcy (@darcydev).</description>
    <link>https://dev.to/darcydev</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%2F196502%2Ff44aa9c3-06ab-4936-8f52-ccd41e2056f9.jpg</url>
      <title>DEV Community: Darcy</title>
      <link>https://dev.to/darcydev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darcydev"/>
    <language>en</language>
    <item>
      <title>DB best practice question</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Tue, 05 Jan 2021 03:48:36 +0000</pubDate>
      <link>https://dev.to/darcydev/db-best-practice-538n</link>
      <guid>https://dev.to/darcydev/db-best-practice-538n</guid>
      <description>&lt;p&gt;I am building an app on Strapi and am deciding on the best practice to organise the database.&lt;/p&gt;

&lt;p&gt;I have a Table (‘Job’) that has roughly 60 rich text form fields. Additionally, each of the form fields needs to have a ‘visibility’ boolean value, which toggles whether the field is viewable by certain users.&lt;/p&gt;

&lt;p&gt;Regarding the database structure, do you think it is better practice to have two separate fields, or to combine them into a single JSON field that contains 'value' and 'visibility' as keys within the field?&lt;/p&gt;

&lt;p&gt;The upside of having them separate is that can store them text and boolean, but the downside is that it will double the number of fields needed for each Table.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to make a Drupal REST API</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Sat, 22 Aug 2020 06:25:03 +0000</pubDate>
      <link>https://dev.to/darcydev/how-to-make-a-drupal-rest-api-55p5</link>
      <guid>https://dev.to/darcydev/how-to-make-a-drupal-rest-api-55p5</guid>
      <description>&lt;p&gt;I want to create a React component on a Drupal8 site to display tweets. &lt;/p&gt;

&lt;p&gt;To do so, I've decided to use Drupal as a backend to make a REST API of Twitter feed and use that feed in the React component.&lt;/p&gt;

&lt;p&gt;Although I have written a couple REST APIs on NodeJS, I am confused about how/where to start on making a REST API on Drupal. Does anyone know a good tutorial/guide to get me started?&lt;/p&gt;

&lt;p&gt;Much appreciated!&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>api</category>
      <category>twitter</category>
    </item>
    <item>
      <title>Headless CMS recommendations</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Sun, 26 Apr 2020 08:10:31 +0000</pubDate>
      <link>https://dev.to/darcydev/headless-cms-recommendations-e4i</link>
      <guid>https://dev.to/darcydev/headless-cms-recommendations-e4i</guid>
      <description>&lt;p&gt;I have used headless CMS for personal projects or smaller clients. However, for a number of large clients (both private and government sectors) I have used Drupal and Wordpress due to the client's preference. &lt;/p&gt;

&lt;p&gt;However, I am really looking at some of the headless CMS alternatives due to a lack of flexibility with time spent configuring Drupal projects.&lt;/p&gt;

&lt;p&gt;Can anyone recommend a good headless CMS, specifically for large clients?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Help! How to upload files to S3</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Sat, 18 Apr 2020 02:12:22 +0000</pubDate>
      <link>https://dev.to/darcydev/help-how-to-upload-files-to-s3-18hh</link>
      <guid>https://dev.to/darcydev/help-how-to-upload-files-to-s3-18hh</guid>
      <description>&lt;p&gt;Hey all :) I am struggling with something and wondering whether somebody could help me.&lt;/p&gt;

&lt;p&gt;I am trying to upload files to S3. I have watched several tutorials on it and am still having trouble, specifically:&lt;/p&gt;

&lt;p&gt;Whether to upload from server-side or client? For this project, the cost is a priority and based on this &lt;a href="https://levelup.gitconnected.com/upload-image-directly-from-react-app-to-amazon-s3-856280c62e45"&gt;article&lt;/a&gt; I am learning toward uploading client side. Is that the correct approach?&lt;/p&gt;

</description>
      <category>help</category>
      <category>aws</category>
      <category>react</category>
    </item>
    <item>
      <title>The power of 'focus music' for programmers</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Sun, 19 Jan 2020 23:22:06 +0000</pubDate>
      <link>https://dev.to/darcydev/the-power-of-focus-music-for-programmers-8oo</link>
      <guid>https://dev.to/darcydev/the-power-of-focus-music-for-programmers-8oo</guid>
      <description>&lt;p&gt;👋&lt;/p&gt;

&lt;p&gt;If you've developed a seriously high tolerance for caffeine like me, you may want to read on 🤔. &lt;/p&gt;

&lt;p&gt;Quickly after working full-time as a developer, I began to realize that my morning cup of Joe wasn't working for me anymore. Soon, two, three and then four cups of Joe ☕ ☕ ☕ ☕ simply wasn't cutting it for me!&lt;/p&gt;

&lt;p&gt;The coffee jitters had me all like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3orieXICLyh0qpuIyQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3orieXICLyh0qpuIyQ/giphy.gif" width="450" height="450" alt="too-much-coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I explored other ways to boost my morning productivity. l-Theanine combined with the coffee does help, but the rest that I tried were overpriced and way overhyped IMO (bulletproof coffee 🤥).&lt;/p&gt;

&lt;p&gt;I recently discovered, what I can only describe as, 'focus music'. That is music which has been specifically created to improve focus and concentration. Heck, even &lt;a href="https://www.runnersworld.com/news/g23901366/eliud-kipchoge-playlist-kelly-clarkson-songs/"&gt;Kipochge listens to Kelly Clarkson&lt;/a&gt;. I have always avoided music while working as it invariably becomes even more distracting than the original noise I'm trying to drown out. So, when I signed up for a trial with Brain.fm, I wasn't expecting too much (although, I did expect it to be at least better than Kelly Clarkson). However, I was pleasantly surprised by how effective their music was! I was able to quickly and consistently develop a &lt;a href="https://hackernoon.com/flow-state-hacking-your-productivity-95b28668e280"&gt;flow state&lt;/a&gt;. There is a bunch of &lt;a href="https://www.brain.fm/science"&gt;research&lt;/a&gt; about &lt;em&gt;why&lt;/em&gt; their music is so effective (something to do with pitch and lack of instrumental complexity of the music). All I know is that I have replaced my jitter-inducing coffees with a cup of green tea 🍵 and focus music 🎵. &lt;/p&gt;

&lt;p&gt;He's deep in that flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13HgwGsXF0aiGY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13HgwGsXF0aiGY/giphy.gif" width="450" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have since found the Brain.fm desktop app a little buggy and prefer to work my phone switched off. Therefore, I have replaced it with simply using YouTube which is awash with free focus music soundtracks.&lt;/p&gt;

&lt;p&gt;Have you tried 'focus music', and what are your productivity boosters?&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>A Year in Review: 2019</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Tue, 31 Dec 2019 09:21:38 +0000</pubDate>
      <link>https://dev.to/darcydev/a-year-in-review-2019-1h8m</link>
      <guid>https://dev.to/darcydev/a-year-in-review-2019-1h8m</guid>
      <description>&lt;p&gt;As a review for the year, I thought that I'd compile a list of lists for several categories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Deep-Work-Focused-Success-Distracted/dp/1455586692"&gt;Deep Work: Rules for Focused Success in a Distracted World&lt;/a&gt;: details the 'science of productivity'. As the distractions around us continue to grow, the ability to perform deep work is becoming both increasingly rare and valuable. The book illustrated the critical importance of 'attention residue'. That is, if you're constantly switching from one task to another, a residue of your attention remains stuck thinking about the previous task. To avoid this, work for extended periods with &lt;em&gt;full concentration&lt;/em&gt; on a single task. As a consequence of reading the book, I've been encouraged to disengage from social media and, as the author describes, 'embrace boredom' as a tool to train ourselves for intense concentration. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Atomic-Habits-Proven-Build-Break/dp/B07RFSSYBH/ref=sr_1_1?keywords=atomic+habits&amp;amp;qid=1577576146&amp;amp;s=books&amp;amp;sr=1-1"&gt;Atomic Habits: An Easy &amp;amp; Proven Way to Build Good Habits &amp;amp; Break Bad Ones&lt;/a&gt;: focuses on very small but incredibly powerful (hence atomic) habits. When applied, the changes that stem from atomic habits may seem small and unimportant at first but will compound into remarkable results over time. Habits are the compound interest of self-improvement and therefore focus on the &lt;em&gt;system&lt;/em&gt; rather than your goals. In addition, the book outlined exactly how to introduce (and stick to) an atomic habit: 1) make it obvious, 2) make it attractive, 3) make it easy, and 4) make it satisfying. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Ultralearning-Master-Outsmart-Competition-Accelerate/dp/B07ST3Z1Q6/ref=sr_1_1?crid=2CLEJU31E60FH&amp;amp;keywords=ultralearning&amp;amp;qid=1577576194&amp;amp;s=audible&amp;amp;sprefix=ul%2Caudible%2C332&amp;amp;sr=1-1"&gt;Ultralearning: Master Hard Skills, Outsmart the Competition, and Accelerate Your Career&lt;/a&gt;: the author, Scott Young, is an incredibly interesting character: from completing MIT's four-year undergraduate computer science curriculum in 12 months, without taking any classes! Or, by traveling the World without speaking English for 12 months and learned Spanish, Portuguese, Mandarin Chinese, and Korean! The book is about how to supercharge your learning to become hyper-productive. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Mean-Genes/dp/1429238615/ref=sr_1_1?keywords=mean+genes&amp;amp;qid=1577576222&amp;amp;s=audible&amp;amp;sr=1-1-catcorr"&gt;Mean Genes&lt;/a&gt;: whilst genes haven't changed much in tens of thousands of year, the environment around us has changed enormously. Essentially, what happens when our hunter-gatherer minds are transported into a 'fast food nation'. The result is a "mismatch" that results in four categories of self-defeating behaviors (profligacy, gluttony, infidelity, and addiction). The book is a fun tour of these behaviors and provides an insight into some of our self-defeating but difficult-to-control behaviors.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Algorithms-Live-Computer-Science-Decisions/dp/B01D24NAL6/ref=sr_1_1?crid=1PW3841RAQX5E&amp;amp;keywords=algorithms+to+live+by&amp;amp;qid=1577576251&amp;amp;sprefix=algorithms%2Caps%2C338&amp;amp;sr=8-1"&gt;Algorithms to Live By: The Computer Science of Human Decisions&lt;/a&gt;: provides practical examples of the application of computer science and algorithms to real-life decision-making. In doing so, it distills an algorithm into simply a series of steps that you can follow to solve a very specific problem, which can then be run as often you like and will always provide a solution.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2019 Tech Trends
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;React Hooks&lt;/strong&gt;: although released in (late) 2018, React Hooks have exploded in 2019 as a way to manage a component's state and lifecycle in functional components with a simple and concise syntax. In addition, React provides the ability to build custom hooks to create reusable components and shared logic, without the need to create higher-order components or use render props. Personally, I'm still drawn to the clearer separation between stateless functional components and Class components, although to ability code so succinct is drawing me more and more to React Hooks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility and Internationalisation&lt;/strong&gt;: after the rapid developments of JavaScript between 2015-2018, developments have begun to evolve less dramatically. As a result, the focus is increasingly shifting toward ensuring the web is open and useable by everyone! Specifically, ensuring the web is accessible to people with disabilities, those using mobile devices, or with slow network connections. In addition, developers increasingly design/developing their work in a way that ensures it will be accessible, or easily adapted for, users from any culture, region or language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ES2019&lt;/strong&gt;: whilst not as significantly as other recent releases ES2019 brought some nice new features, including to the ability to strip whitespace (&lt;code&gt;String.trimStart()&lt;/code&gt;/&lt;code&gt;String.trimEnd()&lt;/code&gt;), the ability to concatenate arrays up to a specified depth (&lt;code&gt;Array.flat()&lt;/code&gt;/&lt;code&gt;Array.flatMap()&lt;/code&gt;), the ability to transform a list of key-value pairs into an Object (&lt;code&gt;Object.fromEntries()&lt;/code&gt;), and &lt;code&gt;try/catch&lt;/code&gt; binding!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraphQL&lt;/strong&gt;: GraphQL is data-driven, as opposed to endpoint-driven, allowing the client to declare the exact data they need and receive a corresponding JSON response from the server. Thus, giving the developer full visibility into the API. GraphQL overcomes several of the shortcomings of REST APIs. In 2020, GraphQL may overtake REST for new companies, and established companies continue to migrate toward GraphQL!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt;: the language &lt;em&gt;de jour&lt;/em&gt;, largely because it offers tools that result in less buggy and more readable code with the types of object interfaces offering self-documentation. Whether TypeScript becomes a mainstay in the frontend community or goes the way of CoffeeScript remains to be seen. However, the rapid releases from v3.0 in late-2018 to v3.7 in 2019 indicates that it remains on the rapid-growth trend!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2020 Predictions
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Watch for ES2020&lt;/strong&gt;: Since ES2015, JavaScript has been rapidly evolving. As of 2019, there are many new features in the 'Stage 3' phase meaning that they're close to being finalized, and browsers/Node are getting support for these features now.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Optional Chaining Operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Optional Chaining allows for the ability to conditionally check for nested objects. Thus, if our program runs into an &lt;code&gt;undefined&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; property, instead of crashing, it will simply return &lt;code&gt;undefined&lt;/code&gt;. At present, it hasn't been implemented in any browser, but Babel will use this feature.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj = {
  prop1: {
    prop2: {
      prop3: {
        prop4: {
          prop5: 5
        }
      }
    }
  }
}

console.log(obj?.prop1?.prop2?.prop3?.prop4?.prop5); // 5
console.log(obj?.prop100?.prop2?.prop3?.prop4?.prop5); // undefined
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Nullish Coalescing Operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The problem with the &lt;code&gt;||&lt;/code&gt; operator is that it applies to all 'falsy values'. To solve this, the &lt;code&gt;??&lt;/code&gt; has been introduced to set the default value only if the first time is either &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const ES2015_Feature = x || 500;
const ES2020_Feature = x || 500;

const x = false;

console.log(ES2015_Feature); // null
console.log(ES2020_Feature); // 500
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;CSS-in-JS will overtake standard CSS&lt;/strong&gt;: the frontend community is solidifying around uniting everything under JavaScript! CSS-in-JS remains a big part of this transition. The simplicity of passing props, instead of using different class names, means that it handles that dynamic styles with a declarative syntax. The result is a much cleaner and more logical integration of style between CSS/JSX/JS code. In 2020, watch out for Facebook's release of their own CSS-in-JS library!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Micro Frontends&lt;/strong&gt;: micro frontends allow you to split your frontend architecture into different frontends for different teams working on different parts of your app. The growth of Bit has allowed smaller teams of devs to isolate, build and test individual components. In 2020, watch for Bit introducing deployments which will allow teams to deploy and update standalone frontends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vue3&lt;/strong&gt;: with a passionate community following devoted to its relative simplicity and the fact that it's not controlled by a giant tech company (unlike React and Angular). In 2020, watch out for the long-anticipated update to v3.0 expected in Q4 2019, so expect significant Vue growth in 2020!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Established technologies aren't going anywhere&lt;/strong&gt;: despite the release of new and shiny libraries and languages, the enduring demand for established technologies (think Drupal, PHP, WordPress, jQuery) will remain strong throughout 2020.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Happy New Year! 😃
&lt;/h2&gt;

</description>
      <category>devjournal</category>
    </item>
    <item>
      <title>An intro to CSS-in-JS libraries</title>
      <dc:creator>Darcy</dc:creator>
      <pubDate>Sun, 08 Sep 2019 02:03:04 +0000</pubDate>
      <link>https://dev.to/darcydev/an-intro-to-css-in-js-libraries-bl9</link>
      <guid>https://dev.to/darcydev/an-intro-to-css-in-js-libraries-bl9</guid>
      <description>&lt;p&gt;As so many inspired by &lt;a href="https://blog.vjeux.com/2014/javascript/react-css-in-js-nationjs.html" rel="noopener noreferrer"&gt;Christopher Chedeau's talk on Facebook's use of CSS in JS&lt;/a&gt;, many libraries have emerged as a way of implementing the methodology. In fact, when selecting a library, you may yourself slightly overwhelmed with the number of options available.&lt;/p&gt;

&lt;p&gt;At the core of each of the libraries is the ability to use them with modern component-based applications. The aim of this article to provide an outline and comparison of four of the libraries that I've used most often:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Styled-Components&lt;/li&gt;
&lt;li&gt;Emotion&lt;/li&gt;
&lt;li&gt;Glamor&lt;/li&gt;
&lt;li&gt;Aphrodite&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Library&lt;/th&gt;
&lt;th&gt;Template Literal&lt;/th&gt;
&lt;th&gt;Object Literal&lt;/th&gt;
&lt;th&gt;Automatic Vendor Prefixing&lt;/th&gt;
&lt;th&gt;Server-Side Rendering&lt;/th&gt;
&lt;th&gt;ClassName Required&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;styled-components&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fdelete-sign.png" alt="cross"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emotion&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fdelete-sign.png" alt="cross"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Glamor&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fdelete-sign.png" alt="cross"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Aphrodite&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fdelete-sign.png" alt="cross"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.icons8.com%2Fcolor%2F48%2F000000%2Fchecked-2.png" alt="tick"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;From the table above, it is clear that many of the key features are shared by all the libraries. In fact, I often find myself choosing a particular CSS-in-JSS library based on syntactic reasons. At the time of writing, that means using &lt;strong&gt;styled-components&lt;/strong&gt; for converting preexisting projects to React (for the ability to use template literals) and &lt;strong&gt;Aphrodite&lt;/strong&gt; for new projects (for, in my opinion, it's clearer separation of CSS and JS logic).&lt;/p&gt;

&lt;h3&gt;
  
  
  Template Literal vs Object Literal
&lt;/h3&gt;

&lt;p&gt;At the time of writing, only &lt;strong&gt;styled-components&lt;/strong&gt; and &lt;strong&gt;Emotion&lt;/strong&gt; allow you to write styles as template literals. This is a significant advantage for when you are converting an existing codebase to React, as it forces you to do very little modification of the CSS. &lt;/p&gt;

&lt;h4&gt;
  
  
  Template Literal
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Using template literal string in Emotion&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
  color: hotpink;
`&lt;/span&gt;

&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;
    &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;;
      background-color: #eee;
    `&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;hotpink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Object Literal
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// using Object Literal styles in Emotion&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;darkorchid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fontSize&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;fontSize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;darkorchid&lt;/span&gt; &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Syntactic Differences
&lt;/h3&gt;

&lt;p&gt;In comparing the syntactic differences between the libraries, it is best to replicate the same element. For these purposes, I will be creating two buttons of different colors.&lt;/p&gt;

&lt;h4&gt;
  
  
  Styled-Components
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;styled-components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="s2"&gt;`
  background: transparent;
  border-radius: 3px;
  border: 2px solid #007bff;
  color: #007bff;
  margin: 0.5em 1em;
  padding: 0.25em 1em;

  &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;primary&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
    background: #007bff;
    color: white;
  `&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;StyledComponentsLib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Normal&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;primary&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Primary&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;StyledComponentsLib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Emotion
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@emotion/styled&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@emotion/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="s2"&gt;`
  background: transparent;
  border-radius: 3px;
  border: 2px solid #007bff;
  color: #007bff;
  margin: 0.5em 1em;
  padding: 0.25em 1em;

  &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;primary&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
    background: #007bff;
    color: white;
  `&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;EmotionLib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Normal&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;primary&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Primary&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;EmotionLib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Glamor
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;glamor&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;css&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;transparent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2px solid #007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.5em 1em&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.25em 1em&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;css&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myButton&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;GlamorLib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;primaryButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;css&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Normal&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;primaryButton&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;Primary&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;GlamorLib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Aphrodite
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aphrodite&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;myButton&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;transparent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2px solid #007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.5em 1em&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.25em 1em&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#007bff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;primaryButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;primary&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;css&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myButton&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;primaryButton&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AphroditeLib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Normal&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;primary&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Primary&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;AphroditeLib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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