<?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: Derek Shanks</title>
    <description>The latest articles on DEV Community by Derek Shanks (@dbshanks).</description>
    <link>https://dev.to/dbshanks</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%2F235141%2Fbebab178-e4aa-4ad4-9d93-066db93ab99f.jpeg</url>
      <title>DEV Community: Derek Shanks</title>
      <link>https://dev.to/dbshanks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dbshanks"/>
    <language>en</language>
    <item>
      <title>The Full Stack Illusion</title>
      <dc:creator>Derek Shanks</dc:creator>
      <pubDate>Sat, 13 Mar 2021 01:59:50 +0000</pubDate>
      <link>https://dev.to/dbshanks/the-full-stack-illusion-p5h</link>
      <guid>https://dev.to/dbshanks/the-full-stack-illusion-p5h</guid>
      <description>&lt;p&gt;Coming off yet another frustrating Full Stack interview, I wanted to engage the Dev community. Possibly find other developer's drowning in the same ocean I am. Suggestions, idea's, conversation and the all popular rant. &lt;/p&gt;

&lt;p&gt;If there are HR / tech interviewers reading this. Hopefully it might open your line of questioning to ensure you achieve the best talents in all layers of the full stack concept. &lt;/p&gt;

&lt;p&gt;After today's interview, this illusion of full stack is destructive. The question's, always the same. All algorithmic, all data structure, always obscure disconnected 'error' examples that are without context. Don't get me wrong, it's important to understand these concepts.&lt;/p&gt;

&lt;p&gt;There is never any questioning about browser compatibility, no positioning or box model trip ups, no UI / UX related questions. CSS is absolutely discounted. No creative focus whatsoever, my resume shows that I have ThreeJS / WebGL and other canvas based technologies. No camera position, texture, layout or rendering issues. No X, Y, Z position related questions. Areas I would excel and ensure strong candidacy for a potential role with the company. Instead I am left with a huge sense of inadequacy because the interview focused solely on middle and back end only.&lt;/p&gt;

&lt;p&gt;Full stack is a broad list of skill sets. It is a utility that extraordinary back end developers dared to venture into front end world. Talented, creative front end developers dared to reach into the back end. With libraries like React and Vue. There is now an enormous inert boulder thrown into the fray that is the intermediate layer.&lt;/p&gt;

&lt;p&gt;With most jack-jill-or-jackill-of all trades, you specialize more or less in some areas. It's hard to be an expert in all areas of each stack. My area of expertise, all visual. Just like there are full stack devs out there who would run rings around me on the algorithmic questions. But will swear and rage obliterate their keyboard because there is a rogue 'div' not behaving as much as I will Nine Inch Nails my playlist because my ID's aren't matching what my database records should produce.&lt;/p&gt;

&lt;p&gt;I am the dev you come to for a really complex multi state animated navigation system, GSAP is getting out of control. No worries, I'll build a library of re-usable animation functions to keep the bloat down. Need a custom grid system to house images, videos with comments revealing on hover. Absolutely. I gotcha. You want to experiment beyond the stars with anything visual. I am on it. I love visual development. It's why I list myself as UI / UX developer. I also love building fully involved applications.&lt;/p&gt;

&lt;p&gt;My last ten interviews, not one of them had any relevant questioning on visual creative focus and not even a mention of animation development or creative ideation of possibilities. &lt;/p&gt;

&lt;p&gt;I am writing this from the vantage point of a UI developer, I am sure back end focused developers have points to share that I have missed. &lt;/p&gt;

&lt;p&gt;Please, don't say there is a framework for that. There is a point of being experts in a field that exceed what frameworks deliver. Frameworks are nice and efficient to have, but will never solve everything a project needs.&lt;/p&gt;

&lt;p&gt;I look forward to hearing the thoughts and experiences of others. I am ranting at this point. Full Stop! I do advertise Dev on my resume. Ha!&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>devjournal</category>
      <category>webdev</category>
      <category>inclusion</category>
    </item>
    <item>
      <title>An Efficient React + TailwindCSS + Styled Components Workflow</title>
      <dc:creator>Derek Shanks</dc:creator>
      <pubDate>Wed, 22 Jan 2020 17:38:03 +0000</pubDate>
      <link>https://dev.to/dbshanks/an-efficient-react-tailwindcss-styled-components-workflow-458m</link>
      <guid>https://dev.to/dbshanks/an-efficient-react-tailwindcss-styled-components-workflow-458m</guid>
      <description>&lt;h1&gt;
  
  
  Notice December 2nd 2020
&lt;/h1&gt;

&lt;p&gt;With the release of Tailwind 2.0 much of this article is overkill for newly started projects. However, many companies do stay behind on versions to ensure consistency. &lt;/p&gt;

&lt;p&gt;If you are staying behind on versions before Tailwind 2.0. Carry on. Otherwise, I’ll be posting a new workflow covering React with Tailwind 2.0. &lt;/p&gt;

&lt;h1&gt;
  
  
  The Motive
&lt;/h1&gt;

&lt;p&gt;Many can appreciate the problems TailwindCSS attempts to solve, providing low opinions on how to style your application. It comes with a cost of long line of class selectors that tends to overtake the template logic of your application. &lt;/p&gt;

&lt;p&gt;Another DEV.to author &lt;a class="comment-mentioned-user" href="https://dev.to/ryanlanciaux"&gt;@ryanlanciaux&lt;/a&gt;
 wrote an article which you can find here &lt;a href="https://dev.to/ryanlanciaux/tailwind-with-react-2ncl"&gt;Tailwind with React&lt;/a&gt;. This started my mad labratory experiments. I was motivated to leverage the fantastic tools TailwindCSS offers. &lt;/p&gt;

&lt;p&gt;A CSS library that I have utilized before, Tachyons, has a similar utility class strategy as Tailwind. I implemented an alternative Styled Component concept to manage the utility classes provided by Tachyons.&lt;/p&gt;

&lt;p&gt;Combining Ryan's process with my strategy for Tachyons. The two methods arrive at an efficient TailwindCSS workflow. It is setup intensive. Worth the effort for maintaining a clean Tailwind style strategy that will scale nicely as your project grows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;If you just want to dive into the project without having to build from scratch. Scroll to the bottom of the article and run the Create React App template command that will scaffold the entire project  and dependencies discussed in this article.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  We need a Create React App
&lt;/h1&gt;

&lt;p&gt;First, we need a fresh Create React App install.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app my-new-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd my-new-app&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Deleting the standard boilerplate from Create React App
&lt;/h1&gt;

&lt;p&gt;The instructions coming next will help you create the following folder tree. Initially you'll want to delete the React boilerplate. &lt;code&gt;logo.svg&lt;/code&gt;, &lt;code&gt;index.css&lt;/code&gt;, &lt;code&gt;App.css&lt;/code&gt; and remove their imports from &lt;code&gt;index.js&lt;/code&gt; and &lt;code&gt;App.js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src
│       ├── App.jsx
│       ├── App.test.js
│       ├── AppStyles.styles.tw.js
│       ├── README.md
│       ├── index.css
│       ├── index.js
│       ├── serviceWorker.js
│       ├── setupTests.js
│       ├── tailwind.config.js
│       └── tailwind.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to install the rest of the dependencies to put Tailwind together with Styled-Components.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i --save tailwindcss tailwind.macro@next styled-components babel-plugin-macros postcss-cli autoprefixer&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create tailwind.config.js
&lt;/h1&gt;

&lt;p&gt;Once the packages have installed. We need to initialize &lt;code&gt;tailwind.config.js&lt;/code&gt;. We can customize Tailwind properties specific to the needs of our projects. For this example, I have added some configuration to change Tailwinds default 'blue-gray' tint to a flatter grayscale.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx tailwind init&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ./src/tailwind.config.js&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontFamily&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Helvetica&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sans-serif&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Helvetica-Neue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sans-serif&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="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;gray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;100&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#f5f5f5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;200&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#eeeeee&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;300&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#e0e0e0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;400&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#bdbdbd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;500&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#9e9e9e&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#757575&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;700&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#616161&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;800&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#424242&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;900&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#212121&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="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;variants&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You need to move &lt;code&gt;tailwind.config.js&lt;/code&gt; to the &lt;code&gt;.src&lt;/code&gt; folder. Create React App has &lt;code&gt;ModuleScopePlugin&lt;/code&gt; which prevents Tailwind Macro and Babel Macro Plugin from calling the &lt;code&gt;tailwind.config.js&lt;/code&gt; from &lt;code&gt;root&lt;/code&gt; folder. There are ways around this, It wasn't a critical or urgent enough issue to add these additional steps just to put the config file back into &lt;code&gt;root&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;All other build formats that do not include the &lt;code&gt;ModuleScopePlugin&lt;/code&gt; can serve &lt;code&gt;tailwind.config.js&lt;/code&gt; from &lt;code&gt;root&lt;/code&gt; folder as usual. &lt;/p&gt;

&lt;h1&gt;
  
  
  Create Tailwind.css
&lt;/h1&gt;

&lt;p&gt;Create the following file &lt;code&gt;tailwind.css&lt;/code&gt; in &lt;code&gt;.src&lt;/code&gt; directory adding the base Tailwind variables that call the utilities from Tailwinds package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//./src/tailwind.css&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;tailwind&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;tailwind&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;tailwind&lt;/span&gt; &lt;span class="nx"&gt;utilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Create babel-plugin-macros.config.js
&lt;/h1&gt;

&lt;p&gt;We need to address the &lt;code&gt;tailwind-macro&lt;/code&gt; package to utilize Tailwinds config file. This allows us to use the &lt;code&gt;tw&lt;/code&gt; macro, (we will create this very soon) and allows Babel to read all of Tailwinds utilities.&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;babel-plugin-macros.config.js&lt;/code&gt; in your &lt;code&gt;root&lt;/code&gt; and copy the following settings into the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//./babel-plugin-macros.config.js&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;tailwind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;macros&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/tailwind.config.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;auto&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Create postcss.config.js
&lt;/h1&gt;

&lt;p&gt;And... finally we need to direct PostCSS to use Tailwind and Autoprefixer during compile. We will leverage this setup in a moment in our &lt;code&gt;package.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Add this file to your root directory.&lt;br&gt;
&lt;code&gt;postcss.config.js&lt;/code&gt; and copy the following settings into the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//./postcss.config.js&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tailwindcss&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/tailwind.config.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;autoprefixer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Update your package.json
&lt;/h1&gt;

&lt;p&gt;Home stretch. Add the following scripts to your &lt;code&gt;package.json&lt;/code&gt; This will call PostCSS Cli to build and watch while you're developing as create-react-app module reloading updates live. It will also automatically generate &lt;code&gt;index.css&lt;/code&gt; for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// package.json&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scripts&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;build:css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;postcss src/tailwind.css -o src/index.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;watch:css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;postcss src/tailwind.css -o src/index.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;npm run watch:css &amp;amp; react-scripts start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;npm run build:css react-scripts build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-scripts test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eject&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-scripts eject&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Phew! Still with me? Awesome.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; File naming conventions are a matter of personal preference. I use the &lt;code&gt;.jsx&lt;/code&gt; and &lt;code&gt;styles.tw.js&lt;/code&gt; extensions for better visual distinction in my editors. &lt;code&gt;.jsx&lt;/code&gt; gets the React logo, the &lt;code&gt;.styles.tw.js&lt;/code&gt; gets the standard JavaScript logo. It helps differentiate template from the styles. Feel free to name your files however you find most comfortable. &lt;/p&gt;

&lt;h2&gt;
  
  
  Create AppStyles.styles.tw.js
&lt;/h2&gt;

&lt;p&gt;Let's create our styled component first in the &lt;code&gt;.src&lt;/code&gt; directory: Let's just get things up and running making incremental changes to ensure each change works correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ./AppStyles.styles.tw.js&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="s2"&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AppStyles&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;div&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;w-full h-screen bg-gray-100 p-2&lt;/span&gt;&lt;span class="dl"&gt;"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Create App.jsx
&lt;/h1&gt;

&lt;p&gt;We begin creating our template, copy the following code into &lt;code&gt;App.jsx&lt;/code&gt;. You'll notice, styling is a little off at the moment if you're running the app. We'll fix that shortly. We only have part of Tailwind working currently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ./src/App.jsx&lt;/span&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="s2"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./index.css&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;AppStyles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./AppStyles.styles.tw&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;App&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AppStyles&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Greetings Earthling&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        Welcome to your Create-React-App / TailwindCSS / Styled Components
        template
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Resources / Documentation&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://reactjs.org/docs/create-a-new-react-app.html"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            ReactJS
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://tailwindcss.com/"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;TailwindCSS&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://styled-components.com/"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Styled Components&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;AppStyles&lt;/span&gt;&lt;span class="p"&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;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding 'tw' macro to AppStyles.styles.tw.js
&lt;/h2&gt;

&lt;p&gt;BAM! Things are working nicely so far. Great job! Now, let's add the additional magic to extend the powerful capabilities of using Tailwind isolated behind Styled Components. We'll add the &lt;code&gt;tw&lt;/code&gt; variable and import  the &lt;code&gt;tailwind.macro&lt;/code&gt;library from NPM. &lt;/p&gt;

&lt;p&gt;Update your &lt;code&gt;AppStyles.styles.tw.js&lt;/code&gt; file with the new code written below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ./src/AppStyles.styles.tw.js&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="s2"&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;tw&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tailwind.macro&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;AppStyles&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;div&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;w-full h-screen flex flex-col items-center justify-center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="s2"&gt;`
  &amp;amp; {
    h1 {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`font-sans text-6xl font-hairline text-6xl text-teal-500`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    }
    p {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`text-gray-700 text-lg`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    }
    h2 {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`text-2xl font-hairline mt-5 text-teal-500`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    }
    ul {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`inline-flex`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    }
    li {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`mr-5`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    }
    a {
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`text-blue-500 hover:text-gray-500 hover:underline`&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="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;AppStyles&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reviewing what we have just added, this setup now allows you to nest your Tailwind classes like you would with Sass. You can run through the entire component template using, class selectors, id's and html tags. It will follow all items from the parent container, each child and / or siblings. Pretty awesome, Right?&lt;/p&gt;

&lt;p&gt;If you have the app currently running in the background. You need to restart it in order for all of the config files to compile with Create React App.&lt;/p&gt;

&lt;p&gt;On completion of all steps, your file tree should look as follows. &lt;/p&gt;

&lt;p&gt;Your &lt;code&gt;root&lt;/code&gt; directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./styled-tailwind
├── .gitignore
├── README.md
├── babel-plugin-macros.config.js
├── node_modules
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── src
└── yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;.src&lt;/code&gt; folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./src
├── App.jsx
├── App.test.js
├── AppStyles.styles.tw.js
├── index.css
├── index.js
├── serviceWorker.js
├── setupTests.js
├── tailwind.config.js
└── tailwind.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Great Job &amp;amp; Final Thoughts
&lt;/h1&gt;

&lt;p&gt;That was a lot of setup prep work. There are many options you have available for your design workflow at this point. You're not limited to just Tailwind CSS classes. In between the backticks, you can also write normal CSS as follows. It offers lot of design possibilities and excellent opportunities to experiment with complex animations using Tailwind styled objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AppStyles&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;div&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;w-full h-screen flex flex-col items-center justify-center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="s2"&gt;`
    &amp;amp; {
      h1 {
        &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tw&lt;/span&gt;&lt;span class="s2"&gt;`font-sans text-6xl font-hairline text-6xl text-teal-500`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        transform: scale(1);
        transition: all 0.3s ease-in-out;
     }
      h1:hover {
      transform: scale(2);
    }
}
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  A Create-React-App template.
&lt;/h1&gt;

&lt;p&gt;You don't have to do any of this again. I have created a template that can be used with Create React App. Everything we have installed in this article, will be pre-installed and ready for your next creative spark.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app my-new-app --template styled-tailwind&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd my-new-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm run start&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Voila! Greetings Earthling!
&lt;/h3&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Making GitHub Gists powerful with GistPad for VSCode</title>
      <dc:creator>Derek Shanks</dc:creator>
      <pubDate>Tue, 31 Dec 2019 00:10:01 +0000</pubDate>
      <link>https://dev.to/dbshanks/making-github-gists-powerful-with-gistpad-for-vscode-j20</link>
      <guid>https://dev.to/dbshanks/making-github-gists-powerful-with-gistpad-for-vscode-j20</guid>
      <description>&lt;p&gt;As a developer, I am thankful to other devs who create utilities to make coding more productive. Every now and then there are tools that arrive and deserve community excitement.&lt;/p&gt;

&lt;p&gt;Many developers have debated &lt;a href="https://gist.github.com/discover"&gt;GitHub Gists&lt;/a&gt; and its usefulness. Nonetheless many still use it. It is a cumbersome process to go back and forth between browser and editor to search for your Gists as it is disconnected from GitHub in an odd way. It's not tied into your main repository profile. Its just there. Gist just exists.&lt;/p&gt;

&lt;p&gt;For those who are unaware of what Gists are. Gists are simplified code. Not full application logic. It's for those pesky code patterns that you have to keep checking for syntax. Better even, re-usable code patterns that you utilize often and don't want to keep re-writing. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker Compose files &lt;/li&gt;
&lt;li&gt;Save VSCode settings&lt;/li&gt;
&lt;li&gt;Babel config files&lt;/li&gt;
&lt;li&gt;Prettier config files&lt;/li&gt;
&lt;li&gt;Postcss config files &lt;/li&gt;
&lt;li&gt;NPM package.json objects&lt;/li&gt;
&lt;li&gt;Bash commands &lt;/li&gt;
&lt;li&gt;Git Commands&lt;/li&gt;
&lt;li&gt;Pesky CLI commands &lt;/li&gt;
&lt;li&gt;There are many prime Gist candidates across all languages. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are a couple of small snippets I have stored. First, a CSS font smoothing property. Autoprefixer does not prefix at compile. I am forever hunting these four lines of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;-webkit-font-smoothing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;antialiased&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;-moz-osx-font-smoothing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grayscale&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Second: &lt;em&gt;Thought Bubble - Lost in thought!&lt;/em&gt; Does the 'and' sit inside of the braces or between the braces on CSS media query? My Gist has the answer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;481px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;767px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;CSS&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;My next big project. Produce a file of 'for loops' in all of the tools I use. I use them often, they contain slightly different syntax. Easy to forget. Perfect candidate for a Gist text file.&lt;/p&gt;

&lt;h1&gt;
  
  
  Enter GistPad
&lt;/h1&gt;

&lt;p&gt;Johnathan Carter &lt;a href="https://twitter.com/lostintangent"&gt;@lostintangent on Twitter&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/lostintangent"&gt;@lostintangent GitHub&lt;/a&gt; has produced such a tool deserving of mass excitement. GistPad. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs"&gt;The GistPad Extension Microsoft MarketPlace&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/vsls-contrib/gistpad"&gt;GistPad GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I don't want to re-invent the docs as Johnathan has meticulously provided great documentation to get you up and running.&lt;/p&gt;

&lt;p&gt;Some of the awesome features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Comes with an icon for the sidebar. This provides a drawer of your Gist files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You're able to view your own Gists and the Gists you have starred from other developers. You can also leave comments or code suggestions without leaving VSCode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You're able to capture snippets from your code base and easily push it from your editor to your Gist repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An awesome playground utility with connected files like Codepen in your editor. Sometimes you want to test code before you insert into your codebase. As a frontend developer. This is such an amazing tool to have running locally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Johnathan is eager for feedback and input. He is actively working hard on this. &lt;em&gt;Fun fact:&lt;/em&gt; He just pushed some updates to GitHub 38 minutes ago while I was writing this.&lt;/p&gt;

&lt;p&gt;If you haven't already abandoned my article in excitement yet. Here is your chance to leave in excitement now. &lt;a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs"&gt;Go get GistPad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy New Year&lt;br&gt;
I wish you all a successful and productive 2020!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;All images and animation are property of Johnathan Carter and GistPad&lt;/em&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Foo, Bar, Baz - The path to confuse your audience.</title>
      <dc:creator>Derek Shanks</dc:creator>
      <pubDate>Sun, 06 Oct 2019 18:10:22 +0000</pubDate>
      <link>https://dev.to/dbshanks/foo-bar-baz-the-path-to-confuse-your-audience-2d0d</link>
      <guid>https://dev.to/dbshanks/foo-bar-baz-the-path-to-confuse-your-audience-2d0d</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;As a developer, I have always been good at memorizing patterns. Therefore, I can whip up applications using various tools. I can usually find documentation which feature patterns that match my knowledge. That is where the problem comes in.&lt;/p&gt;

&lt;p&gt;I can consume libraries based on their patterns. However, I still struggle with looking at a blank document. I have been uncomfortable with establishing my own creative pattern with any of the programming languages I know. This is largely due to the vast amount of courses, tutorials and books that I have consumed over the years that included the senseless Foo, Bar, Baz examples.&lt;/p&gt;

&lt;p&gt;With any spoken language, you learn words, you phrase them into something sensible using small sentences. Eventually you're able to creatively express yourself.As programmers, we realize that we speak in variables all day long. &lt;/p&gt;

&lt;p&gt;You experience moments, input feelings into those moments, store those moments to express later. Variables, without doubt are meaningful to our applications as much as our daily life.&lt;/p&gt;

&lt;p&gt;Example: &lt;em&gt;This is the worse program logic in the world and immediately disqualifies me from ever making instructional material at length.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// I am only capturing and hoping to change this awful mess later.

let coffeeMaker = brokenCoffeeMaker; 


if coffeeMaker === brokenCoffeeMaker {
  console.log('#$$&amp;amp;##&amp;amp;@, F-You World, not ready to say Hello yet');

} else {

 console.log('Sing a Disney song all the way to work');

}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  To Instructors of Programming Topics &amp;amp; Documentation Teams
&lt;/h2&gt;

&lt;p&gt;First, thank you for taking the time to address a need and introduce us willing learners to various programming topics. It ultimately helps us gain competitive edge towards our future. &lt;/p&gt;

&lt;p&gt;Please, rethink your variable naming for instructional material. Your audience would rather learn from code that reads like a story. Trying to figure out what Foo, Bar, Baz or other insignificant variables mean. Destroys the value of the code logic you are trying to share.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution: An Awesome Learning Gem for JS Programmers and Instructors
&lt;/h2&gt;

&lt;p&gt;I wanted to share a FREE short length (2hrs) JavaScript course I found on Udemy. This module truly broke the barrier I was suffering with. Creative Programming.&lt;/p&gt;

&lt;p&gt;When you look past the lack of syntax highlighting and the instructors use of a very basic text editor (Notepad) as well as usage of ES2015 (It is what Babel coughs out for us right?). &lt;em&gt;My thought process... if this instructor doesn't need highlighting, es-lint and various other useful editor add-ons. I'm going to pay attention&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;The instructor, Chris DeLeon truly hits the mark on discussing meaningful and sensible variables while breaking down the meaning for every line of code. His use of hard coding values first, then refactoring the code with pre-school literacy level variables provided an impacting learning experience.&lt;/p&gt;

&lt;p&gt;Finally, all of the lightbulbs went off in my head. I am watching creative programming. I appreciate now more so than ever, how much control I have during the creative programming process.&lt;/p&gt;

&lt;p&gt;While it is a simple game, the programming required introduces some complex logic, motion, variable storage, reconstruction of variables as the application evolves. This is exciting. You get a Pong Clone for your effort of investing only a couple hours.&lt;/p&gt;

&lt;p&gt;Code Your First Game: Arcade Classic in JavaScript on Canvas&lt;br&gt;
&lt;a href="https://www.udemy.com/share/101r8kAEIYeV5XQXg=/"&gt;https://www.udemy.com/share/101r8kAEIYeV5XQXg=/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I am not affiliated with Chris DeLeon, nor do I benefit in sharing this course.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  P.S.
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Forget about fixing my earlier variable. Starting over.

const angryDerek = buysNewCoffeeMaker;

// Apologies to any Dev I may have frightened with my terrible brokenCoffeeMaker logic.  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Svelte - Simplicity is best.</title>
      <dc:creator>Derek Shanks</dc:creator>
      <pubDate>Fri, 04 Oct 2019 21:22:25 +0000</pubDate>
      <link>https://dev.to/dbshanks/svelte-simplicity-is-best-1e5h</link>
      <guid>https://dev.to/dbshanks/svelte-simplicity-is-best-1e5h</guid>
      <description>&lt;h2&gt;
  
  
  Github Repo
&lt;/h2&gt;

&lt;p&gt;For your review, I created a small web application to show the value of Svelte at even the most basic level of web development, Svelte as a beautiful templating engine. Fork, Clone, Run, Copy, Use, Laugh, Shake your head etc... and enjoy. &lt;/p&gt;

&lt;p&gt;I utilized a very small portion of Svelte tools in order to demonstrate re-usability of components. App.svelte, FormInput.svelte and Button.svelte have the code reflecting how easy re-usability is implemented with Svelte.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;I did not add functionality to the button or form input. The purpose of the application is to demonstrate templating functionality. As well, the app is not mobile responsive.&lt;/em&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/dbshanks" rel="noopener noreferrer"&gt;
        dbshanks
      &lt;/a&gt; / &lt;a href="https://github.com/dbshanks/devTO-article" rel="noopener noreferrer"&gt;
        devTO-article
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A simple scaffold landing page for a DEV.TO article about SvelteJS
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;Clone the repo. Change my-new-app to what your desired project name is.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;npx degit dbshanks/devTO-article my-new-app
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Run the npm install.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;cd my-new-app &amp;amp;&amp;amp; npm install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Run the dev script to play around with the project.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/dbshanks/devTO-article" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;You can view the live working demo here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dbshanks.github.io/devTO-article" rel="noopener noreferrer"&gt;https://dbshanks.github.io/devTO-article&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;There will be plenty of articles and video tutorials about creating complex idea's using the simplicity of Svelte.&lt;/p&gt;

&lt;p&gt;I wanted to scale even further back and enjoy the most basic implementation of using Svelte as a design tool.&lt;/p&gt;

&lt;p&gt;Not all of us have a need to build complex reactive apps, some of us are still building simplistic landing pages and general purpose online presence. &lt;/p&gt;

&lt;p&gt;We deserve code sanity and maintenance friendly design. In the case of the design I have provided from my repo. Most would never utilize React, Vue, Angular and others to implement such a small project. &lt;/p&gt;

&lt;p&gt;Svelte is the perfect tool for such a minimal use case. It is the component architecture I believe most of us had dreamt of back in 2015 when 'Component Architecture' was all the buzz and libraries were surfacing up all over Github. &lt;/p&gt;

&lt;p&gt;Svelte remains minimal as it is a compiler that gets out of your codebase at production build. Projects like React, Vue and Angular are either libraries or full frameworks. With Svelte our application is just a minified bundle.js file connected to the HTML. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Application
&lt;/h2&gt;

&lt;p&gt;This is the structure of my SRC folder in a Svelte application. I am still a fan of separating my CSS/SCSS from component logic. &lt;/p&gt;

&lt;p&gt;This format should still look familiar, the pattern is utilized in React, Vue and Angular. While Svelte is still young, I wanted to propose the idea of a solid project pattern or best practice concept for folder structures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src
├── App.scss
├── App.svelte
├── components
│   ├── Button
│   │   ├── Button.scss
│   │   └── Button.svelte
│   ├── Footer
│   │   ├── Footer.scss
│   │   └── Footer.svelte
│   ├── FormInput
│   │   ├── FormInput.scss
│   │   └── FormInput.svelte
│   └── Navigation
│       ├── Navigation.scss
│       └── Navigation.svelte
└── main.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding Preprocessor Support
&lt;/h2&gt;

&lt;p&gt;If you want to add Sass or other preprocessors to your Svelte app. It's a very simple modification. Install the following NPM packages to your SvelteJS project. &lt;em&gt;At this time, I am only able to verify consistency with either .sass or .scss files. Go ahead and experiment.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install svelte-preprocess node-sass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following lines of code to replace the plugins section of 'rollup.config.js' file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    plugins: [
        svelte({
            // enable run-time checks when not in production
            dev: !production,
            // we'll extract any component CSS out into
            // a separate file — better for performance
            css: css =&amp;gt; {
                css.write('public/bundle.css');
            },
            preprocess: autoPreprocess() // Add the autoPreprocess package to plugins.
        }),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add 'svelte-preprocess' to your 'rollup.config.js' imports at the top of the file. svelte preprocess automatically detects the node-sass package and uses it during the development and build process. I leave the global.css untouched with exception to some minimal defaults.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import autoPreprocess from 'svelte-preprocess'; //Add autoPreprocess to import.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you're able to do either of the following. Inline your styles in the component directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;style lang ="scss"&amp;gt;

$primary-color: red;
$secondary-color: blue;

h1 {
 color: $primary-color;
}

h2 {
 color: $secondary-color;
}
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if preferred you're able to setup your stylesheet as an import as I have done  by importing the Sass files between the style tags of the component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;style lang="scss"&amp;gt;
 @import './componentName.scss';
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;There is a lot of excitement about Svelte and its future as a goto tool for web application development. As demonstrated from my small application on the Github repo provided, the code requirement is minimal to get up and running with Svelte.&lt;/p&gt;

&lt;p&gt;On the front end, it is a seemingly simple one page design. On the back end, the site has a fully reactive tool to scale as needed. As developers, we can push a simple application to start. In the future we can further develop a complex application to fit our projects scale requirements. &lt;/p&gt;

&lt;p&gt;Hopefully I have enticed some to go and play with Svelte. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This was inspired by an article that Dave Ceddia wrote on implementing Sass into Svelte&lt;/em&gt; &lt;a href="https://daveceddia.com/svelte-with-sass-in-vscode/" rel="noopener noreferrer"&gt;https://daveceddia.com/svelte-with-sass-in-vscode/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
