<?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: Kyle Luke</title>
    <description>The latest articles on DEV Community by Kyle Luke (@lukekyl).</description>
    <link>https://dev.to/lukekyl</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%2F421066%2F269c500a-abd3-455d-8682-60af1d3ac462.png</url>
      <title>DEV Community: Kyle Luke</title>
      <link>https://dev.to/lukekyl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukekyl"/>
    <language>en</language>
    <item>
      <title>2020 State of JS in Review</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Tue, 02 Mar 2021 18:36:01 +0000</pubDate>
      <link>https://dev.to/lukekyl/2020-state-of-js-in-review-1pc8</link>
      <guid>https://dev.to/lukekyl/2020-state-of-js-in-review-1pc8</guid>
      <description>&lt;p&gt;JavaScript, and it's world of related technologies and frameworks, are constantly in motion. While the massively adopted heavy hitters such as React and WebPack work very well, and are not going away anytime soon, still new frameworks and features arise to help make JS become more efficient and effective (and dare I say simple?), keeping developers learning. Since 2016, &lt;a href="https://twitter.com/sachagreif"&gt;Sacha Greif&lt;/a&gt; and &lt;a href="https://twitter.com/benitteraphael"&gt;Raphaël Benitte&lt;/a&gt; have been collecting, analyzing and visualizing data on how developers use JavaScript, tracking how JS technologies and usage differs from year to year. 2020 data has recently been released, and show some interesting insights into how the &lt;a href="https://2020.stateofjs.com/"&gt;State of JavaScript&lt;/a&gt; is evolving for developers.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://2020.stateofjs.com/"&gt;2020 State of JavaScript&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rftyaD9U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/2lqcrcb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rftyaD9U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/2lqcrcb.jpg" alt="State of JavaScript Website"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Fun Insights
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Front-End Frameworks
&lt;/h4&gt;

&lt;p&gt;Looking through popular JavaScript frameworks, there are a few that top the usage charts year after year, such as &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;, &lt;a href="https://angular.io/"&gt;Angular&lt;/a&gt;, and &lt;a href="https://vuejs.org/"&gt;Vue&lt;/a&gt;. What was interesting to see while looking into JS front-end frameworks from 2019 to 2020 was the swift adoption of &lt;a href="https://svelte.dev/"&gt;Svelte&lt;/a&gt;, which not only topped the charts in User Satisfaction and Interest in the past two years, but has moved it's way from the 9th to the 4th most used CSS framework in a year. This newly popular JavaScript framework is definitely worthy of a look for any Frontend Developer.&lt;/p&gt;

&lt;h6&gt;
  
  
  Takeaway: &lt;a href="https://svelte.dev/"&gt;Svelte&lt;/a&gt;
&lt;/h6&gt;




&lt;h4&gt;
  
  
  Back-End Frameworks
&lt;/h4&gt;

&lt;p&gt;While looking at options for building a JavaScript back-end, the options included in the survey results can seem a little muddled. First, there are back-end specific frameworks such as &lt;a href="https://expressjs.com/"&gt;Express.js&lt;/a&gt;, and then there are fully functional server-side rendering frameworks such as &lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt; and &lt;a href="https://www.gatsbyjs.com/"&gt;Gatsby.js&lt;/a&gt; that provide out-of-the-box functionality with backends included and requiring minimal setup. Express is clear leader in usage, but Next.js is gaining popularity and ties with Express for the highest satisfaction rate. When it comes to needing a pre-built, boilerplate single-page-application setup, Next.js seems to be a great option, but if building a more customized or diverse application that needs a dedicated and specific backend, Express.js has maintained its place since released in 2017 as the clear winner in JavaScript back-end frameworks.&lt;/p&gt;

&lt;h6&gt;
  
  
  Takeaway: &lt;a href="https://expressjs.com/"&gt;Express.js&lt;/a&gt;
&lt;/h6&gt;




&lt;h4&gt;
  
  
  Data Layer
&lt;/h4&gt;

&lt;p&gt;When it comes to importing the back-end data layer into the front-end, &lt;a href="https://redux.js.org/"&gt;Redux&lt;/a&gt; remains the most used state management tool, but &lt;a href="https://graphql.org/"&gt;GraphQL&lt;/a&gt; is gaining in popularity of usage and maintains the highest satisfaction rating. Important to note, GraphQL is not a state management tool, but instead is a different way of managing the data layer and allows for less data to manage in the front-end. The use of GraphQL reduces developers need of using a robust state management tool such as Redux, and allows for the potential use of a simpler state management solution. Redux seems to not satisfy developers like it used to, and new tools have entered the arena within 2020 to help resolve this issue. We will see if any of these tools take hold as the most used for state management and the data layer in the near future. For now, GraphQL seems like a good API for developers to look into for managing the data layer.&lt;/p&gt;

&lt;h6&gt;
  
  
  Takeaway: &lt;a href="https://graphql.org/"&gt;GraphQL&lt;/a&gt;
&lt;/h6&gt;




&lt;h4&gt;
  
  
  Most Adopted JavaScript Technology: TypeScript
&lt;/h4&gt;

&lt;p&gt;Much of the reason for looking into this type of survey data for the usage and trends of JavaScript by professional developers is to find the best emerging tools, and to look into which technologies have been adopted by the most developers. In 2020, the clear winner in adoption across the majority of JavaScript developers is &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;, which builds on traditional JavaScript while introduces static typing, helping developers catch errors early and improving reliability of the code written.&lt;/p&gt;

&lt;h6&gt;
  
  
  Takeaway: &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;
&lt;/h6&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;While there are definitely some heavily adopted and highly reliable tools that most developers keep going back to in the world of JavaScript development (React, WebPack), keeping an eye out for new technologies that might improve or simplify development is always exciting to do. Looking through the date visualizations from the &lt;a href="https://2020.stateofjs.com/"&gt;2020 State of JavaScript&lt;/a&gt; can be useful for newbies and more senior developers alike in learning what new features and technologies are on the rise, along with what is being used currently with high levels of satisfaction. I myself will be looking into improving my JavaScript toolset and feature usage after looking into these trends, and so should you!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What new JS technology have you been learning or do you want to learn next??&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>yearinreview</category>
    </item>
    <item>
      <title>Improving Keyboard Accessibility with Floating Focus</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Thu, 25 Feb 2021 04:36:06 +0000</pubDate>
      <link>https://dev.to/lukekyl/improving-keyboard-accessibility-with-floating-focus-ig7</link>
      <guid>https://dev.to/lukekyl/improving-keyboard-accessibility-with-floating-focus-ig7</guid>
      <description>&lt;p&gt;When it comes to creating accessible websites it is important to note that many users navigate the web through the use of a keyboard. Instead of clicking around the site with a mouse, these users navigate via the keyboard by using the "tab" key. When an HTML element within a website is able to handle keyboard input, that element is said to have &lt;code&gt;focus&lt;/code&gt;. Only one HTML element can have &lt;code&gt;focus&lt;/code&gt; at one time, and users navigate between these elements by "tabbing" through them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is &lt;code&gt;:focus&lt;/code&gt; and why should we manage it?
&lt;/h2&gt;

&lt;p&gt;The elements that can recieve &lt;code&gt;focus&lt;/code&gt; include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;a href=""&amp;gt;Link&amp;lt;/a&amp;gt;&lt;/code&gt; tags&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; elements and buttons&lt;/li&gt;
&lt;li&gt;any element that include &lt;code&gt;tabindex&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not all of the users that navigate through a website by "tabbing" through &lt;code&gt;focus&lt;/code&gt; elements are blind users, but many are impaired in ways that including additional visual queues could help them navigate more effectively. Wouldn't it be nice if, while these users are "tabbing" through, these &lt;code&gt;focus&lt;/code&gt; items animated from one item to the next, adding a visual queue to where the next item in focus is located. This idea has been created in a few different forms, but I wanted to bring up a newer open source library that works across all browsers: &lt;code&gt;FloatingFocus&lt;/code&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing &lt;code&gt;FloatingFocus&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;As multiple options have come around to improve the way the standard &lt;code&gt;focus&lt;/code&gt; styling and operability works, &lt;a href="https://engineering.q42.nl/floating-focus/"&gt;none seemed to be as complete as the Dutch tech agency Q42 has hoped&lt;/a&gt;. Some had browser compatibility issues, others could benefit from additional or improved styling. &lt;a href="https://dev.to@guidobouman"&gt;Guido Bouman&lt;/a&gt; and the team at Q42 decided they could make something that makes both the end user and the design team happy, &lt;a href="https://github.com/Q42/floating-focus-a11y"&gt;and came up with the library titled &lt;code&gt;FloatingFocus&lt;/code&gt;&lt;/a&gt;. The result is an easy to implement new tool that automatically finds &lt;code&gt;focus&lt;/code&gt; items, giving them improved styling and animation to display when they are "tabbed" too and from.&lt;/p&gt;

&lt;p&gt;The following steps show you how to add &lt;code&gt;FloatingFocus&lt;/code&gt; to your own project, and include only a few simple lines of JS and CSS. &lt;/p&gt;

&lt;h4&gt;
  
  
  NPM Import
&lt;/h4&gt;

&lt;p&gt;First we will import the package into our project. We then need to instantiate it to run &lt;code&gt;FloatingFocus&lt;/code&gt; in our app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import FloatingFocus from '@q42/floating-focus-a11y';
new FloatingFocus(containerElement); 
// containerElement is an optional parameter which defaults to `document.body` when removed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  CSS
&lt;/h4&gt;

&lt;p&gt;We then need to add the following to our CSS file. Some of these styles are optional, so look at the comments or try with and without to decide if you want them in our app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Hide all default focus states if a mouse is used, this is completely optional of course */
*:focus {
  outline: none;
}

/* Default outline value, which will be applied to all elements receiving focus, this is a required step. */
/* The .focus class is used by the focus target, more below. */
.floating-focus-enabled :focus, .floating-focus-enabled .focus {
  outline: dodgerblue solid 2px;
  outline-offset: 8px;
}

/* Give all buttons a green focus state instead of dodgerblue, this is optional in case it's needed. */
.floating-focus-enabled [type="button"]:focus {
  outline-color: green;
  outline-offset: 4px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;

&lt;p&gt;Below is a &lt;a href="https://codepen.io/lukekyl/pen/BaQmGga"&gt;CodePen example&lt;/a&gt; so you can see what &lt;code&gt;FloatingFocus&lt;/code&gt; looks like when implemented. To see the library in action, click within the CodePen example and "tab" a few times between focus items.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/BaQmGga?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accessibility is an important factor in web development, and all users should be considered as you are building a new website or application. &lt;code&gt;FloatingFocus&lt;/code&gt; helps assist users navigating your website with a keyboard by clearly displaying and animating which item has the focus state across the web page they are viewing. I hope this blog post gives you ideas on how you want to improve keyboard accessibility in your projects!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you think about &lt;code&gt;focus&lt;/code&gt; while developing your front end user experience? Do you have any tips or favorite tools for improving keyboard accessibility? Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Additional Resources for Improving Focus and Keyboard Operability
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://usability.yale.edu/web-accessibility/articles/focus-keyboard-operability"&gt;Yale University Usability &amp;amp; Web Accessibility: Focus &amp;amp; Keyboard Operability &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/robdodson/managing-focus-64l"&gt;Rob Dodson's Dev.to Article: Managing focus for accessibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/almanac/selectors/f/focus/"&gt;CSS Tricks Article: :focus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Q42/floating-focus-a11y"&gt;FloatingFocus GitHub Page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>a11y</category>
      <category>css</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Animated Page Transitions in React</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:31:28 +0000</pubDate>
      <link>https://dev.to/lukekyl/animated-page-transitions-in-react-5c3a</link>
      <guid>https://dev.to/lukekyl/animated-page-transitions-in-react-5c3a</guid>
      <description>&lt;p&gt;Animated transitions between pages can make your single page web app more engaging, and keep users interested in the app and maintain context of what they were looking at instead of waiting for a page to load. Animations have been used on the web for some time to improve effectiveness, simplify the user experience, and to make the content more engaging and fun. Have you ever scrolled through a website and wondered how to make a website animate between pages? Yeah, so have I. This post is meant to show you how easy it is to create a simple animation between routes in a single page web app using React.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://material.io/design/motion/the-motion-system.html#principles" rel="noopener noreferrer"&gt;Take a look at how Material Design describes the importance of animation.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FzQmdP94.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FzQmdP94.gif" alt="Example Page Transition Animations from Material Design: https://material.io/design/motion/the-motion-system.html#principles"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  ReactCSSTransitionGroup API - Simple CSS Transitions
&lt;/h3&gt;

&lt;p&gt;The React team supports a community-maintained API add-on component for React called React CSS Transition Group, which allows an easy way to add CSS animations to React components. The &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; is a component of the larger &lt;code&gt;react-transition-group&lt;/code&gt; package, and is useful to defining CSS classes for stages of a component animation cycle, allowing you to apply CSS styling and animation transitions on stages such as &lt;code&gt;.page-transition-enter&lt;/code&gt; or &lt;code&gt;.page-transition-leave&lt;/code&gt;. I will be using &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; in my demo, to make a quick and easy entrance and exit animation for two pages in a React app via CSS transitions.&lt;/p&gt;
&lt;h5&gt;
  
  
  Add ReactCSSTransitionGroup as component enveloping Routes
&lt;/h5&gt;

&lt;p&gt;We first have to include &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; into our component, and then we will wrap our Routes around with this component, defining a transitionName so we can access the styles in CSS later. The transitionName we will choose for this demo is &lt;code&gt;page-transition&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// React
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;

class Layout extends React.Component {
  render() {
    return (
      &amp;lt;div&amp;gt;
        // Add ReactCSSTransitionGroup to Routes with name: 'page-transition'
        &amp;lt;ReactCSSTransitionGroup component="div" transitionName="page-transition"&amp;gt;
           &amp;lt;Routes /&amp;gt;
        &amp;lt;/ReactCSSTransitionGroup&amp;gt;
      &amp;lt;/div&amp;gt;
);}}


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

&lt;/div&gt;
&lt;h5&gt;
  
  
  Apply CSS Class Names to Routes
&lt;/h5&gt;

&lt;p&gt;We then have to add the CSS class names we would like each Route component to include, so we can style them correctly and apply our animations.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// Setting Home Route up with "transition" CSS class
class Home extends React.Component {
  render() {
    return (
      &amp;lt;div className="transition blue"&amp;gt;
           &amp;lt;Link to="about"&amp;gt;
              &amp;lt;h1&amp;gt;NEXT&amp;lt;/h1&amp;gt;
           &amp;lt;/Link&amp;gt;
      &amp;lt;/div&amp;gt;
    );
}}

// Setting About Route up with "transition" CSS class
class About extends React.Component {
  render() {
    return (
      &amp;lt;div className="transition coral"&amp;gt;
          &amp;lt;Link to="home"&amp;gt;
            &amp;lt;h1&amp;gt;LAST&amp;lt;/h1&amp;gt;
          &amp;lt;/Link&amp;gt;
      &amp;lt;/div&amp;gt;
    );
}}


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  CSS
&lt;/h3&gt;

&lt;p&gt;The CSS we need to style includes the display of each component while they are active, along with the CSS classes for each transition stage of the &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; we would like to animate. Remember, we chose &lt;code&gt;page-transition&lt;/code&gt; as our &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; transitionName, so the API will look for classes with that associate className to run during the transition cycle. We just want to animate as the page enters and leaves, so will style both the &lt;code&gt;.page-transition-enter&lt;/code&gt; and &lt;code&gt;.page-transition-leave&lt;/code&gt; classes together for simplicity.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

//CSS
$time: 2s;
$easing: ease-in-out;

// Style components how they should appear when active
.transition {
  width: 100%;
  height: 100%;

  div {
    transition: all $time/2 $easing;
    width: 99vw;
    height: 97vh;
    margin: .5% auto;
  }

  h1 {
    transition: all $time/2 $easing;
    transform: translateY(0);
  }

  &amp;amp;.coral &amp;gt; div {
    background: #f34044;
  }

  &amp;amp;.blue &amp;gt; div {
    background: #405efb;
  }
}

// Style page transition animations under the ReactCSSTransitionGroup name we chose: 'page-tansition' 
.page-transition-enter, .page-transition-leave {
  transition: opacity $time $easing;
  opacity: 0;
  position: absolute;

  div {
     margin-top: 35%;
     height: 0;
     opacity: 0;
     width: 20vw;
  }

  h1 {
    transform: scale(.8);
    opacity: 0;
  }
}

.page-transition-enter.page-transition-enter-active {
  opacity: 1;
}

.page-transition-leave.page-transition-leave-active  {
  opacity: 0;
}


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  Example Application
&lt;/h3&gt;

&lt;p&gt;I created a demo of our application on CodePen so you have a full example of the code. Feel free to steal some or all of the code from this &lt;a href="https://codepen.io/lukekyl/pen/XWNMWzL" rel="noopener noreferrer"&gt;CodePen example&lt;/a&gt;, but note you will likely need to adjust the styling to fit your own application and what you would like it to do. &lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/XWNMWzL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I am just touching the surface when it comes to animated page transitions in React, but it has been exciting to learn so far, and &lt;code&gt;ReactCSSTransitionGroup&lt;/code&gt; makes it easy to implement basic CSS animations and transformations on a React component's lifecycle. When done correctly, adding animations to page transitions can help improve your apps user experience, making it more fun to use, and giving it a more responsive and faster feel. &lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Resources for using ReactCSSTransitionGroup
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/animating-between-views-in-react/" rel="noopener noreferrer"&gt;CSS-Tricks: Animating Between Views in React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/joserfelix/page-transitions-in-react-1c8g"&gt;Dev post by Jose Felix: Page Transitions In React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactjs.org/docs/animation.html" rel="noopener noreferrer"&gt;React Docs: Animation Add-Ons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://reactcommunity.org/react-transition-group/" rel="noopener noreferrer"&gt;React Community: React Transition Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Have you used Animated Page Transitions in your React project?&lt;/strong&gt;&lt;br&gt;
Comment if you have used ReactCSSTransitionGroup, have another favorite library, or have any suggestions for improvements!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>react</category>
      <category>css</category>
    </item>
    <item>
      <title>How To Avoid Layout Shifts When Using Web Fonts</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Mon, 08 Feb 2021 20:34:24 +0000</pubDate>
      <link>https://dev.to/lukekyl/how-to-avoid-layout-shifts-when-using-web-fonts-3n7g</link>
      <guid>https://dev.to/lukekyl/how-to-avoid-layout-shifts-when-using-web-fonts-3n7g</guid>
      <description>&lt;p&gt;I posted recently about &lt;a href="https://dev.to/lukekyl/how-to-build-a-skeleton-layout-in-react-21hb"&gt;using a skeleton layout&lt;/a&gt; to reduce cumulative layout shifts as asynchronous content loads on your website. Layout shifts can not only be annoying, but &lt;a href="https://www.searchenginejournal.com/cumulative-layout-shift/371946/" rel="noopener noreferrer"&gt;might also affect the SEO&lt;/a&gt; of your website with Google's updated ranking system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do Web Fonts cause Layout Shifts?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FaUtY00L.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FaUtY00L.jpg" alt="Font Layout Shift Example"&gt;&lt;/a&gt;&lt;br&gt;
As you load in a custom web font, the browser has to asynchronously download that font, often times causing the text on your page to change in size or spacing after loading, which in turn causes a blip (or shift) in the layout as fonts get replaced. There are several strategies for preventing layout shifts caused by the use of web fonts, and &lt;a href="https://simonhearne.com/2021/layout-shifts-webfonts/#prevent-layout-shifts-with-font-display" rel="noopener noreferrer"&gt;Simon Hearne came out with a great blog post going over many of them&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Secret Strategy: &lt;code&gt;font-display: optional&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;As Simon writes in his blog post, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The dirty little secret of this blog post is that you can resolve layout shifts due to fonts with a single line of CSS: &lt;code&gt;font-display: optional&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  How to Use:
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Example CSS

@font-face {
  font-family: ExampleFont;
  src: url(/path/to/fonts/examplefont.woff2) format('woff2'),
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, if you include this additional line of code when you declare your font-face,  the browser will use a fallback system font if the web font is not loaded and ready by the time text is rendered. Every additional page loaded on your website will then use the web font, as it will then be loaded, which means the user will only see a system font used once if at all. &lt;/p&gt;

&lt;h2&gt;
  
  
  Other Considerations
&lt;/h2&gt;

&lt;p&gt;Designers may cringe at the idea of using a system font for the first load, but user experience and SEO will improve by implementing this great strategy. To reduce the chances of users seeing this initial system font, there are additional strategies that will help the web font load more quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;host your own fonts on your site domain&lt;/li&gt;
&lt;li&gt;subset fonts and serve as &lt;code&gt;woff2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;use variable fonts or a limited set of weight variations&lt;/li&gt;
&lt;li&gt;preload critical fonts &lt;code&gt;&amp;lt;link rel="preload"&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are further expanded on in Simon's blog post, &lt;a href="https://simonhearne.com/2021/layout-shifts-webfonts/#prevent-layout-shifts-with-font-display" rel="noopener noreferrer"&gt;so check them out further if interested&lt;/a&gt;, but the main takeaway is that little option which eliminates layout shift in your project while using web fonts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you are like me and frequently use various web fonts in your own project, but also like to take SEO and user experience into consideration, you may want to look into strategies to reduce cumulative layout shift when loading asynchronous data like web fonts. This simple strategy is a one-shot solution to resolving layout shifts due to web fonts. It can be applied solo or in combination with other considerations to improve your use of custom web fonts on your site or project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you use web fonts in your projects? Have you noticed layout shifts as these fonts load? What other strategies have you used to resolve this issue in the past?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Testing your Express.js Backend Server</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Wed, 03 Feb 2021 21:28:06 +0000</pubDate>
      <link>https://dev.to/lukekyl/testing-your-express-js-backend-server-3ae6</link>
      <guid>https://dev.to/lukekyl/testing-your-express-js-backend-server-3ae6</guid>
      <description>&lt;p&gt;Recently I have been learning about Node, and building a backend API server with Express. Express.js allows for use of the MVC pattern similarly to Ruby on Rails for building a RESTful CRUD API (making a good learning transition for me). While learning how to implement all of the CRUD pieces with Express, I wanted to test the functionality to verify things were working properly. This blog post will explain how to test the CRUD functionality of routes in your Express backend API, with the use of Jest framework and SuperTest library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Express Server
&lt;/h2&gt;

&lt;p&gt;I am assuming that you have an Express server running for this article, but below is a simple sample app to get the tests within this article running (below I will share some additional articles on building an Express server). In the code below you will find two example &lt;code&gt;GET&lt;/code&gt; endpoints, along with some sample code to give you an idea of what your route might ACTUALLY look like when built out further.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// server.js
import express from 'express';
const app = express();

app.get('/users', function(req, res) {
  res.json({ users: 'allUsers' });

  // Real code from my application below
  //  model.User.findAll().then (users =&amp;gt; {
  //        res.status(200).json({ users });
  //     }).catch(error=&amp;gt;{
  //        console.log(error)
  //        req.status(500).send(error)
  //  })
});

app.get('/users/3', function(req, res) {
  res.json({ user: 'user3' });

  // Real code from my application below
  // const { id } = req.params;
  //    model.User.findOne({
  //        where: { id: Number(id) }
  //    }).then(user=&amp;gt;{
  //        res.status(200).json({ user });
  //    }).catch(error=&amp;gt;{
  //        console.log(error)
  //        req.status(500).send(error)
  //    })
});

export const server = app;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looking through the above routes, we see two &lt;code&gt;GET&lt;/code&gt; requests: one for ALL users, and one for a SELECT user. Our tests will verify that each &lt;code&gt;GET&lt;/code&gt; request will return a status code &lt;code&gt;200&lt;/code&gt;, have &lt;code&gt;json&lt;/code&gt; content type, and include the property we want to see returned (such as &lt;code&gt;users&lt;/code&gt;, or &lt;code&gt;user3&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Jest &amp;amp; SuperTest
&lt;/h2&gt;

&lt;p&gt;First and foremost, we have to set up the testing environment. Below are the steps to getting Jest and SuperTest up and running.&lt;/p&gt;

&lt;h5&gt;
  
  
  1. Installing Our Dependencies
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install jest --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install supertest --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install cross-env --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  2. Setting up the testing environment
&lt;/h5&gt;

&lt;p&gt;To set up the testing environment, we need to adjust the &lt;code&gt;package.json&lt;/code&gt; folder in your Express application. The following settings allow you to run &lt;code&gt;npm test&lt;/code&gt; in the CLI, which will perform a reset of the test database, migrate and seed your database each time for accurate testing purposes. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Note &lt;code&gt;NODE_ENV=test&lt;/code&gt; being used to specify the test environment.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// package.json
 "scripts": {
    ...
    "test": "cross-env NODE_ENV=test jest --testTimeout=10000",
    "pretest": "cross-env NODE_ENV=test npm run migrate:reset",
    "migrate:reset": "npx sequelize-cli db:migrate:undo:all &amp;amp;&amp;amp; npm run migrate",
    "migrate": "npx sequelize-cli db:migrate &amp;amp;&amp;amp; npx sequelize-cli db:seed:all",
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need Jest to ignore our &lt;code&gt;./node_modules&lt;/code&gt; folder, so we also need to add this snippet of code to &lt;code&gt;package.json&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;...
 "jest": {
    "testEnvironment": "node",
    "coveragePathIgnorePatterns": [
      "/node_modules/"
    ]
  },
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OK, now to try running a test with &lt;code&gt;npm test&lt;/code&gt; in the command line. Now that we have our testing environment up and running, we should be able to start writing our tests!&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing Tests
&lt;/h2&gt;

&lt;p&gt;We will be working in a new &lt;code&gt;test.js&lt;/code&gt; file, and our goal is to test the functionality of the two &lt;code&gt;GET&lt;/code&gt; requests above: &lt;br&gt;
&lt;code&gt;/users&lt;/code&gt; and &lt;code&gt;/users/3&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;
  
  
  Import
&lt;/h5&gt;

&lt;p&gt;We first need to import some dependancies so we can test our Express server. These go at the top of our &lt;code&gt;test.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//test.js

const server = require('../index.js');
const supertest = require('supertest');
const requestWithSupertest = supertest(server);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will notice that we are using &lt;code&gt;requestWithSupertest&lt;/code&gt;, which links each test to the server.&lt;/p&gt;

&lt;h5&gt;
  
  
  Get all Users
&lt;/h5&gt;

&lt;p&gt;The first thing we need is our initial &lt;code&gt;describe&lt;/code&gt; block which will house BOTH of our tests. In this test, we will be checking how the &lt;code&gt;/user&lt;/code&gt; GET route functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;describe('User Endpoints', () =&amp;gt; {

  it('GET /user should show all users', async () =&amp;gt; {
    const res = await requestWithSupertest.get('/users');
      expect(res.status).toEqual(200);
      expect(res.type).toEqual(expect.stringContaining('json'));
      expect(res.body).toHaveProperty('users')
  });

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

&lt;/div&gt;



&lt;p&gt;In the code above, you notice we have added &lt;code&gt;await&lt;/code&gt; to &lt;code&gt;requestWithSupertest.get('/users')&lt;/code&gt;, because we are testing a promise that needs to be fulfilled before moving forward. We then expect to see a &lt;code&gt;200&lt;/code&gt; status, &lt;code&gt;json&lt;/code&gt; content type, and for the response body to have the &lt;code&gt;users&lt;/code&gt; property. These three expectations fulfill what we wanted to test for in this route's functionality.&lt;/p&gt;

&lt;h5&gt;
  
  
  Get a User by ID
&lt;/h5&gt;

&lt;p&gt;Ok, so we have our first test written. Now for the second test we will make a similar test, this time targeting the &lt;code&gt;/users/3&lt;/code&gt; route. This test is supposed to show how you can test for a GET route of a targeted user id. This test will also be placed within the same &lt;code&gt;describe&lt;/code&gt; block we defined above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  it('GET /user/:id should show a user', async () =&amp;gt; {
        const res = await requestWithSupertest.get('/users/3')
        expect(res.statusCode).toEqual(200)
        expect(res.body).toHaveProperty('user3')
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Run the Tests
&lt;/h5&gt;

&lt;p&gt;Awesome! We have written two tests to verify functionality of our two sample &lt;code&gt;GET&lt;/code&gt; routes. Now to run the tests in the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see two passing tests in our test suite!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You now have the resources to add some testing to your Express API! Hopefully the above examples help you to gain some initial understanding on how to set up and test the functionality of your Express server! I wanted to expand my knowledge of testing Express backend API requests, and this is how I set up tests within my own application!&lt;/p&gt;

&lt;p&gt;Some additional resources I have used to help me learn Express.js and how to test the server include&lt;br&gt;
&lt;a href="https://bezkoder.com/node-js-express-sequelize-mysql/"&gt;Node.js Rest APIs example with Express, Sequelize &amp;amp; MySQL by bezkoder&lt;/a&gt;&lt;br&gt;
&lt;a href="https://levelup.gitconnected.com/building-an-express-api-with-sequelize-cli-and-unit-testing-882c6875ed59"&gt;Building an Express API with Sequelize CLI and Unit Testing! by Bruno Galvao&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/coderslang/how-to-test-your-express-js-backend-with-jest-and-supertest-3g83"&gt;How to test your Express.js backend with Jest and Supertest by Coderslang&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hoppscotch.io/"&gt;Hopscotch.io - a tool to send server requests and see the responses&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Has this article helped you get started with testing your Express server? Respond with comments or recommendations!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to Build a Skeleton Layout in React</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Wed, 27 Jan 2021 03:16:18 +0000</pubDate>
      <link>https://dev.to/lukekyl/how-to-build-a-skeleton-layout-in-react-21hb</link>
      <guid>https://dev.to/lukekyl/how-to-build-a-skeleton-layout-in-react-21hb</guid>
      <description>&lt;p&gt;The use of a Skeleton Layout for asynchronous content is becoming more and more popular across mobile and web apps alike. Google, Facebook, LinkedIn, Youtube and many more use a skeleton layout to display what the content and layout might look like, before it loads. Using one in your own project is a nice styling effect for your users, and also might just improve the SEO of your project in the near future by reducing "&lt;a href="https://dev.to/ben/fixing-cumulative-layout-shift-41ja"&gt;cumulative layout shift&lt;/a&gt;". This post shows you how easy it is to add a skeleton layout that updates after asynchronous content is loaded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqca2xulopeha2nkrc0x.png" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqca2xulopeha2nkrc0x.png" alt="LinkedIn Skeleton Layout Example from: https://uxdesign.cc/what-you-should-know-about-skeleton-screens-a820c45a571a" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  isLoaded State
&lt;/h3&gt;

&lt;p&gt;React allows for us to set state from &lt;code&gt;isLoaded: false&lt;/code&gt; to &lt;code&gt;isLoaded: true&lt;/code&gt; when an asynchronous function has completed. This will be the basis for which set of content we will display. We will create two CSS classes for our content based on the isLoaded state: &lt;code&gt;.loading&lt;/code&gt; and &lt;code&gt;.loaded&lt;/code&gt;. We will then do an if statement that will return the JSX for the &lt;code&gt;.loaded&lt;/code&gt; content, IF &lt;code&gt;isLoaded = true&lt;/code&gt;. IF &lt;code&gt;isLoaded = false&lt;/code&gt;, the app will return the JSX for the &lt;code&gt;.loading&lt;/code&gt; content, which will be our skeleton layout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// JSX
class App extends React.Component {
  constructor(props){
    super(props);

    this.state = {
      isLoaded: false,
      asyncData: []
    }
  };

render(){

    asyncFunction = () =&amp;gt; {
        // Async function fetches asyncData, and upon fetch updates state from `isLoaded:false` to `isLoaded:true`
    }

    if(this.state.isLoaded===true){
        // If state.isLoaded=true, component will render complete layout and async content
          return(
            &amp;lt;&amp;gt;
              &amp;lt;LayoutContent className="loaded" /&amp;gt;
            &amp;lt;/&amp;gt;
          );
        } 

    return(
      // While state.isLoaded=false, component will only render skeleton layout
        &amp;lt;&amp;gt;
            &amp;lt;LayoutContent className="loading" /&amp;gt;
        &amp;lt;/&amp;gt;
    );
};
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CSS
&lt;/h3&gt;

&lt;p&gt;The CSS we need to style will include our two classes: &lt;code&gt;.loading&lt;/code&gt; and &lt;code&gt;.loaded&lt;/code&gt;. This gives you a little freedom for how you would like your skeleton layout to look, but I chose an &lt;a href="https://dev.to/stackfindover/youtube-loading-animation-using-html-and-css-44c2"&gt;animated approach from StackFindOver&lt;/a&gt; for the styling in the CodePen example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Skeleton Layout styles and animation
.loading {
    position: relative;
    background: #cccccc;
}
.loading:after {
    content: "";
    display: block;
    position: absolute;
    top:0;
    width: 100%;
    height: 100%;
    transform: translateX(-100px);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 0.8s infinite;
}
@keyframes loading {
    100% {
        transform: translateX(100%);
    }
}

// Loaded styling
.loaded {
    // Styles
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some additional things to note when it comes to CSS styling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Width and Height of components should be defined to reduce content jumping&lt;/li&gt;
&lt;li&gt;Consider using CSS Flexbox for responsive components with max-width/height defined&lt;/li&gt;
&lt;li&gt;If component sizes vary based on content consider adding an "overflow-y: scroll" property&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Application
&lt;/h3&gt;

&lt;p&gt;Feel free to steal some of the code from this &lt;a href="https://codepen.io/lukekyl/pen/NWRZZoW" rel="noopener noreferrer"&gt;CodePen example&lt;/a&gt;, but note you will likely need to adjust some of the styling to fit your own application. &lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/NWRZZoW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Skeleton layouts not only give your application a fun and useful loading screen as asynchronous content loads, but also might just improve your application's SEO and user experience. Hopefully this blog post and the example gives you some ideas on how to apply a skeleton layout in your own project!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Have you used a Skeleton Layout in your project?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Comment if you have used a similar method, or have suggestions for improvements!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>css</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting Started with  3D: CSS 3D Transformations</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Thu, 21 Jan 2021 06:24:06 +0000</pubDate>
      <link>https://dev.to/lukekyl/getting-started-with-3d-css-3d-transformations-5a4e</link>
      <guid>https://dev.to/lukekyl/getting-started-with-3d-css-3d-transformations-5a4e</guid>
      <description>&lt;p&gt;Working with 3D can be a daunting thing to get started with for many developers. Luckily, it doesn't have to be as complicated as you think to create professional looking 3D transformations with only a little bit of CSS magic. I wanted to help developers that are beginning their journey into 3D CSS transformations to get started with a few basics.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS Property: 3D Transform
&lt;/h3&gt;

&lt;p&gt;3d CSS transforms can add depth and visual interest to elements on your page using perspective. The CSS transform property includes the following 3D transformation methods for mix-and-match use:&lt;/p&gt;

&lt;h5&gt;
  
  
  Rotate
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;rotateX()&lt;/li&gt;
&lt;li&gt;rotateY()&lt;/li&gt;
&lt;li&gt;rotateZ()&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Translate
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;translateX()&lt;/li&gt;
&lt;li&gt;translateY()&lt;/li&gt;
&lt;li&gt;translateZ()&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Skew
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;skewX()&lt;/li&gt;
&lt;li&gt;skewY()&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Scale
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;scaleX()&lt;/li&gt;
&lt;li&gt;scaleY()&lt;/li&gt;
&lt;li&gt;scaleZ()&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Additional
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;transform-origin&lt;/li&gt;
&lt;li&gt;perspective&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Usage
&lt;/h3&gt;

&lt;p&gt;You can use the transform property on any CSS selector. You can also apply a transition to the hover state, or based on mouse or scroll location with the use of additional JS. &lt;a href="https://css-transform.moro.es/"&gt;This CSS-Transform Playground&lt;/a&gt; is an incredible resource built by &lt;a href="https://twitter.com/alterebro"&gt;Jorge Moreno&lt;/a&gt; that allows you to alter and view different mixtures of 3D CSS transform properties, with a toggle on the bottom to activate or deactivate the properties. Play around with the different sliders in this tool to craft your own mixture, and apply those property numbers to your project!&lt;/p&gt;

&lt;p&gt;Here is an example of how you might apply a 3D transform with a hover state transition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  transform:
    perspective(800px)
    rotateY(25deg) scale(0.9)
    rotateX(10deg);
  transition: 0.6s ease all;
}

div:hover {
    transform:
      perspective(800px)
      rotateY(-15deg)
      translateY(-50px)
      rotateX(10deg)
      scale(1);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are some examples of how you can mix and match 3D transforms to make some fun and unique interactions with cards. Feel free to copy the code into your own project and make these transformations your own!&lt;/p&gt;

&lt;h5&gt;
  
  
  Transform Example #1
&lt;/h5&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/VwKNebe?height=600&amp;amp;default-tab=css,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h5&gt;
  
  
  Transform Example #2
&lt;/h5&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/yLarOma?height=600&amp;amp;default-tab=css,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h5&gt;
  
  
  Transform Example #3
&lt;/h5&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/XWjQKJa?height=600&amp;amp;default-tab=css,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h5&gt;
  
  
  Transform Example #4
&lt;/h5&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/lukekyl/embed/QWKPEby?height=600&amp;amp;default-tab=css,result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope these examples allow you to overcome the hurdle of entering the world of 3D on the web. With resources like a visual css-transform playground and pre-build code examples, 3D CSS Transformations are not only easy to make, but will add a whole other level of fun and visual interest to your projects!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are YOUR favorite 3D CSS Transformations? Share in the comments!!!&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Resources
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://css-transform.moro.es/"&gt;3D CSS-Transform Playground&lt;/a&gt;&lt;br&gt;
&lt;a href="https://polypane.app/css-3d-transform-examples/"&gt;Polypane blog: CSS 3D Transform Examples&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform"&gt;MDN Web Docs: transform&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>codepen</category>
    </item>
    <item>
      <title>Implementing Medium's Image Preview with Gatsby Images</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Tue, 12 Jan 2021 05:00:04 +0000</pubDate>
      <link>https://dev.to/lukekyl/implementing-medium-s-image-preview-with-gatsby-images-f5b</link>
      <guid>https://dev.to/lukekyl/implementing-medium-s-image-preview-with-gatsby-images-f5b</guid>
      <description>&lt;p&gt;The zoom-in image preview feature used by Medium for their blogs is a really nice way to allow users a deeper look at the images on your project. I wanted to use this feature for displaying past projects on my portfolio site, but ran into issues between the compatibility of the React Medium Image Zoom library and the Gatsby Image tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Goal
&lt;/h3&gt;

&lt;p&gt;Have you seen the "Image Preview" zoom feature on Medium? It allows a user to view a lightbox version of the full image, filling up the browser with as large of an image as the size allows while seeing it in full.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2F0YRFIKf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2F0YRFIKf.gif" alt="Medium Image Zoom Preview Example"&gt;&lt;/a&gt;&lt;br&gt;
There are multiple React libraries that replicate this image-zoom feature, but the one that seems to have the most users and the largest community for support is the &lt;a href="https://github.com/rpearce/image-zoom" rel="noopener noreferrer"&gt;react-medium-image-zoom&lt;/a&gt; library (built by Robert Pierce)&lt;/p&gt;

&lt;h3&gt;
  
  
  Issues
&lt;/h3&gt;

&lt;p&gt;The steps for use of React Medium Image Zoom are pretty simple. Start by adding the library to your React project (&lt;code&gt;npm i react-medium-image-zoom&lt;/code&gt;), then import Zoom to your desired component, and wrap an image with it.&lt;/p&gt;

&lt;h5&gt;
  
  
  Example:
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import Zoom from 'react-medium-image-zoom'
import 'react-medium-image-zoom/dist/styles.css'

const MyComponent = () =&amp;gt; (
  &amp;lt;Zoom&amp;gt;
    &amp;lt;img src="../images/example.jpg" width="500" /&amp;gt;
  &amp;lt;/Zoom&amp;gt;
)

export default MyComponent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When using with Gatsby though, the issue of using the Zoom feature with Gatsby Images quickly becomes apparent. The Gatsby Images no longer show up! Luckily this is only a CSS issue, and has to do with some of the native styling in both.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resolution
&lt;/h3&gt;

&lt;p&gt;It all comes down to debugging the styling pre-baked into Gatsby Image and the React Medium Zoom library, and implementing fixes that will allow them to both work cohesively together.&lt;/p&gt;

&lt;h5&gt;
  
  
  Required CSS
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Set Gatsby Image className to 100% width and height
gatsbyImage {
  width: '100%',
  height: '100%'
}

// React Medium Image Zoom styling update to work with Gatsby Images
[data-rmiz-wrap='visible'], [data-rmiz-wrap='hidden'] {
    width: 100%;
    height: 100%;
    display: block;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Implementing the Image Zoom feature seen on Medium is a simple, and nice way to improve the user experience in many projects. Hopefully this will help some of you that happen to be trying to implement this feature with Gatsby Images. It's much simpler than I thought to fix, but took me some time to figure out what needed to be done.&lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Resources
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/MantasMikal/a04b2b6b760ef3ef796a00bd84716160" rel="noopener noreferrer"&gt;Mikal Mantis's one-component solution to the React Medium Image Zoom with Gatsby Image issue&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>css</category>
    </item>
    <item>
      <title>How To Query Gatsby Images with GraphQL</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Wed, 06 Jan 2021 16:23:42 +0000</pubDate>
      <link>https://dev.to/lukekyl/how-to-query-gatsby-images-with-graphql-n3f</link>
      <guid>https://dev.to/lukekyl/how-to-query-gatsby-images-with-graphql-n3f</guid>
      <description>&lt;p&gt;When learning new tools, often times the most challenging parts will lead to the coolest features and benefits. This was the case for me when learning to use Gatsby, and how GraphQL works. I struggled hard at figuring out how to use the &lt;code&gt;gatsby-image&lt;/code&gt; plugin, and how to query GraphQL assets to display individual images on in the correct spot.&lt;/p&gt;

&lt;h2&gt;
  
  
  So why Gatsby (and why Gatsby Image)?
&lt;/h2&gt;

&lt;p&gt;For many reasons React developers are choosing to use static site generator such as Gatsby or Next.js. Static site generators create blazing fast single page applications, and also allow for a quicker and simplified development process with multiple available plugins. One plugin that Gatsby does very well is Gatsby-images. Gatsby-images is a react component that lazy-loads images with a blur-up effect, speeding up page loading times dramatically and holding image positions until loaded. The benefits of using Gatsby Images were a major benefit for my portfolio site, so I opted to learn how querying in GraphQL works so I would then be able to individually place a fast loading Gatsby Image on demand.&lt;/p&gt;

&lt;h4&gt;
  
  
  Traditional React Image Example
&lt;/h4&gt;

&lt;p&gt;The original way to import an image into React is through&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import example from '../images/example.jpg'
&amp;lt;img className="example" src={example}/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and produces an image that slowly loads from the top down before displaying.&lt;/p&gt;

&lt;h4&gt;
  
  
  Gatsby Image Example
&lt;/h4&gt;

&lt;p&gt;Gatsby Images are lazy-loaded, starting with the full image visible and a blur effect applied. As the browser has time to download, the image scales up until full resolution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqgg4nlpyx5e39p0mdhyl.gif" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqgg4nlpyx5e39p0mdhyl.gif" width="600" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image from &lt;a href="https://css-tricks.com/ways-to-organize-and-prepare-images-for-a-blur-up-effect-using-gatsby/" rel="noopener noreferrer"&gt;CSS Tricks: Ways to Organize and Prepare Images for a Blur-Up Effect Using Gatsby&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pretty cool, huh!?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Query Gatsby Images with GraphQL
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1. Install the Gatsby Image plugin
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install gatsby-image gatsby-transformer-sharp gatsby-plugin-sharp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Add Gatsby Image plugin to Gatsby Config file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins: [ 
{
resolve: `gatsby-source-filesystem`,
options: { name: `images`,    
path: `${__dirname}/src/images`,
},    
},    
`gatsby-transformer-sharp`,    
`gatsby-plugin-sharp`
, ...additionalplugins 
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Add your images to &lt;code&gt;/src/images&lt;/code&gt; folder
&lt;/h4&gt;

&lt;p&gt;The images folder will be mapped in our query later on to select individual images for conversion and import.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Import Gatsby Image component and GraphQL into Gatsby page file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { graphql } from "gatsby"
import Img from "gatsby-image"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5. Query GraphQL to select image/images and convert to Gatsby Images
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const fluidImage = graphql`
    fragment fluidImage on File {
        childImageSharp {
          fluid(maxWidth: 1600) {
            ...GatsbyImageSharpFluid
          }
          original {
            width
          }
        }
    }
`;

export const pageQuery = graphql`
     query {
       projectHero: file(
         relativePath: { eq: "exampleHero.jpg" }
       ) {
         ...fluidImage
       }
       imageOne: file(
         relativePath: { eq: "examplephoto-1.jpg" }
       ) {
         ...fluidImage
       }
       imageTwo: file(
         relativePath: { eq: "examplephoto-2.jpg" }
       ) {
         ...fluidImage
       }
       imageThree: file(
         relativePath: { eq: "examplephoto-3.jpg" }
       ) {
         ...fluidImage
       }
       imageFour: file(
         relativePath: { eq: "examplephoto-4.jpg" }
       ) {
         ...fluidImage
       }
     }
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  6. Import Gatsby Image tag into page and position/style with CSS
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Img fluid={props.data.file.childImageSharp.fluid} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Full Component Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { Component } from "react"
import Layout from "../components/layout"
import SEO from "../components/seo"

import { graphql } from 'gatsby';
import Img from 'gatsby-image';

const pageId="example"

export const fluidImage = graphql`
    fragment fluidImage on File {
        childImageSharp {
          fluid(maxWidth: 1600) {
            ...GatsbyImageSharpFluid
          }
          original {
            width
          }
        }
    }
`;

export const pageQuery = graphql`
     query {
       projectHero: file(
         relativePath: { eq: "exampleHero.jpg" }
       ) {
         ...fluidImage
       }
       imageOne: file(
         relativePath: { eq: "examplephoto-1.jpg" }
       ) {
         ...fluidImage
       }
       imageTwo: file(
         relativePath: { eq: "examplephoto-2.jpg" }
       ) {
         ...fluidImage
       }
       imageThree: file(
         relativePath: { eq: "examplephoto-3.jpg" }
       ) {
         ...fluidImage
       }
       imageFour: file(
         relativePath: { eq: "examplephoto-4.jpg" }
       ) {
         ...fluidImage
       }
     }
`;


class Example extends Component {

  render() {
    return (
      &amp;lt;Layout&amp;gt;
        &amp;lt;SEO title={pageId} /&amp;gt;
        &amp;lt;div
          className="hero project-hero d-flex align-items-center"
          style={{
            backgroundSize: "cover",
            backgroundPosition: "50% 65%",
            overflow: "hidden",
          }}
        &amp;gt;
          &amp;lt;Img
            fluid={this.props.data.projectHero.childImageSharp.fluid}
            imgStyle={{ objectFit: "cover" }}
            alt="Example project hero image."
          /&amp;gt;
        &amp;lt;/div&amp;gt;
            &amp;lt;Card className="no-radius"&amp;gt;
              &amp;lt;Img
                fluid={this.props.data.imageOne.childImageSharp.fluid}
                imgStyle={{ objectFit: "cover" }}
                alt="Example project example image."
              /&amp;gt;
              &amp;lt;Img
                fluid={this.props.data.imageTwo.childImageSharp.fluid}
                imgStyle={{ objectFit: "cover" }}
                alt="Example project example image."
              /&amp;gt;
              &amp;lt;Img
                fluid={this.props.data.imageThree.childImageSharp.fluid}
                imgStyle={{ objectFit: "cover" }}
                alt="Example project example image."
              /&amp;gt;
              &amp;lt;Img
                fluid={this.props.data.imageFour.childImageSharp.fluid}
                imgStyle={{ objectFit: "cover" }}
                alt="Example project example image."
              /&amp;gt;
            &amp;lt;/Card&amp;gt;
      &amp;lt;/Layout&amp;gt;
)}}
export default Example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Other Thoughts
&lt;/h2&gt;

&lt;h5&gt;
  
  
  Making Gatsby Image a component, and passing URL path as props.
&lt;/h5&gt;

&lt;p&gt;To consolidate and DRY up multiple pages that might put into use the same Gatsby Image queries, you can create a component with the Gatsby Image query, and pass URL paths as props.&lt;/p&gt;

&lt;h5&gt;
  
  
  Using Flexbox vs Float (Float breaks Gatsby Image)
&lt;/h5&gt;

&lt;p&gt;One issue developers might notice while implementing Gatsby Images is that they break with the use of CSS float properties. To overcome this issue, many developers make use of Flexbox instead of float, to shape and align images on the page.&lt;br&gt;
&lt;a href="https://dev.to/steelvoltage/struggling-with-gatsby-images-1ao5"&gt;https://dev.to/steelvoltage/struggling-with-gatsby-images-1ao5&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Run Gatsby Development Server and view GraphQL Playground
&lt;/h5&gt;

&lt;p&gt;The Gatsby GraphQL playground is particularly fun to play around with and test your queries. It will help you identify what is being held in your GraphQL data and how to get to it, and doing some digging around will help you understand how GraphQL queries work.&lt;br&gt;
To view the playground, run your Gatsby development server and visit: &lt;a href="http://localhost:8000/___graphql" rel="noopener noreferrer"&gt;http://localhost:8000/___graphql&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it Work
&lt;/h2&gt;

&lt;p&gt;I got stuck several times during the process of trying to query through my images with GraphQL, and then again displaying them correctly as Gatsby Images. Hopefully this post guides you through querying GraphQL for your own Gatsby project, and how to display images correctly using the benefits of Gatsby Images. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did you find this helpful? If you have used Gatsby Image, what got YOU stuck while learning?&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Resources
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@kyle.robert.gill/ridiculously-easy-image-optimization-with-gatsby-js-59d48e15db6e" rel="noopener noreferrer"&gt;Image Optimization Made Easy with Gatsby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/laurieontech/rewriting-a-static-website-using-gatsby-and-graphql---part-3-4ho9"&gt;Rewriting A Static Website Using Gatsby and GraphQL - Part 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/anisapatel/optimizing-images-with-gatsby-image-3afh"&gt;Optimizing Images with Gatsby Image&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-image/" rel="noopener noreferrer"&gt;Gatsby Docs: Using Gatsby Image to Prevent Image Bloat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://using-gatsby-image.gatsbyjs.org/" rel="noopener noreferrer"&gt;Gatsby Docs: Gatsby Image Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/ways-to-organize-and-prepare-images-for-a-blur-up-effect-using-gatsby/" rel="noopener noreferrer"&gt;CSS Tricks: Ways to Organize and Prepare Images for a Blur-Up Effect Using Gatsby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gatsby</category>
      <category>graphql</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Favorite Resource of the Week: Coding Fonts</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Tue, 29 Dec 2020 00:06:55 +0000</pubDate>
      <link>https://dev.to/lukekyl/favorite-resource-of-the-week-coding-fonts-2h2n</link>
      <guid>https://dev.to/lukekyl/favorite-resource-of-the-week-coding-fonts-2h2n</guid>
      <description>&lt;p&gt;In the world of software development, things move fast. New tools, new libraries, new languages! As technology changes to meet the needs of today's problems, it is important as a developer to keep up to date with what tools work best for you. I am always watching for tools that will help improve my workflow, making me a better designer and developer, and making my work more effective. I would like to share the tools I find that seem to make a difference in my work, and might just help solve some of the problems you are facing in your own!&lt;/p&gt;

&lt;p&gt;This week my favorite resource is a newly found web app on the &lt;a href="https://css-tricks.com/"&gt;CSS-Tricks&lt;/a&gt; site, which helps developers in choosing which coding font's they like best, find most useful, and most effective for their code editing environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS-Tricks: Coding Fonts
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://coding-fonts.css-tricks.com/"&gt;https://coding-fonts.css-tricks.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7dVY5BGr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/IXwzqGD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7dVY5BGr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/IXwzqGD.png" alt="Image of the CSS-Tricks web app titled Coding Fonts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Coding Fonts allows you to switch between 35 of the most popular fonts used by developers in their code editors, and it allows you to see the differences between and the unique aspects of each. Many of these fonts contain unique ligatures, use of italics, variables, and character shapes that help developers see the functions or markup they are calling more accurately and quickly. This web app not only lists the differences between these commonly used fonts, but also allows you to see them in action. Choosing a font that is easy for you to differentiate between characters and visualize unique calls and comments can improve workflow, and be a real productivity booster in your development toolkit! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is your favorite coding font of choice? Is it listed in Coding Fonts? And why do you find it most effective for your daily work use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://coding-fonts.css-tricks.com/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TDg6bVQv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/badge/Visit%2520Site%2520--%253E-CSS_Tricks:_Coding_Fonts-blue" alt="Custom badge"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>todayilearned</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Favorite Resource of the Week: css.gg</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Mon, 21 Dec 2020 19:53:53 +0000</pubDate>
      <link>https://dev.to/lukekyl/favorite-resource-of-the-week-css-gg-1dl9</link>
      <guid>https://dev.to/lukekyl/favorite-resource-of-the-week-css-gg-1dl9</guid>
      <description>&lt;p&gt;In the world of software development, things move fast. New tools, new libraries, new languages! As technology changes to meet the needs of today's problems, it is important as a developer to keep up to date with what tools work best for you. I am always watching for tools that will help improve my workflow, making me a better designer and developer, and making my work more effective. I would like to share the tools I find that seem to make a difference in my work, and might just help solve some of the problems you are facing in your own!&lt;/p&gt;

&lt;p&gt;This week my favorite resource is a newly found library of well designed, open-source, and widely available icons built originally in CSS: &lt;a href="https://css.gg/" rel="noopener noreferrer"&gt;css.gg icon library&lt;/a&gt;. This icon library is awesome, and widely available in a ton of formats, from downloading an using individually or as a set, to opening in design applications such as Figma or Adobe XD, or even importing the NPM module into your React project.&lt;/p&gt;

&lt;h3&gt;
  
  
  css.gg Icon Library
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://css.gg/" rel="noopener noreferrer"&gt;https://css.gg/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FIN5kmqI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FIN5kmqI.png" alt="Image of the css.gg Web App"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to icon libraries, there a lot of options to choose between. So, what makes css.gg icons special? Well first on the list is that it's open-source and caught the attention of a few designers and developers alike that helped increase the number of icons available for use, along with improving the platform availability. &lt;a href="https://dev.to/astrit/why-how-did-i-build-500-css-only-icons-library-a-life-story-34on"&gt;css.gg was created by Astrid Malsija&lt;/a&gt; (also a member of the DEV community!), as a personal project which he made open source. Any it's growing, now including over 700 retina-ready, scalable, and incredibly simple icons, along with being available now as an API for HTML/CSS import, as styled-components, as React NPM imports, and as SVG Sprites. The icons were originally built using pure CSS, which renders them incredibly quickly because it doesn't require any additional resource. The other super cool thing about them being built in CSS, is that they allow for animations (see this &lt;a href="https://css.gg/loadbar" rel="noopener noreferrer"&gt;Loadbar&lt;/a&gt; for example)! If you view any of the icons individually, you can see the CSS code that was used to build each icon. There is also a very friendly &lt;a href="https://github.com/astrit/css.gg" rel="noopener noreferrer"&gt;GitHub ReadMe&lt;/a&gt; that explains how to import and use the icons across all of the available formats.&lt;/p&gt;

&lt;p&gt;Because of css.gg icon libraries' open source friendliness to improve the icons, their quick rendering and scalability, and wide availability in multiple formats, this has become my new favorite icon library for use in my projects, and a great new addition to my development toolbox. I hope you find it useful in your own!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is your favorite icon library, and why do you find that tool to be the most effective for your daily work use?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>css</category>
    </item>
    <item>
      <title>Top Tips for FREE Cross-Browser Testing</title>
      <dc:creator>Kyle Luke</dc:creator>
      <pubDate>Thu, 17 Dec 2020 06:06:32 +0000</pubDate>
      <link>https://dev.to/lukekyl/top-tips-for-free-cross-browser-testing-17jh</link>
      <guid>https://dev.to/lukekyl/top-tips-for-free-cross-browser-testing-17jh</guid>
      <description>&lt;p&gt;When it comes to apps and websites that will live on the wide world of the interwebs, and across many devices and browsers, it is important for developers to consider cross-browser testing to ensure a positive experience for the majority of users. Styling compatibility, JS version issues, and the differing technology used across browser types and release versions make websites and applications behave differently as device, operating system and browser combinations change. Developers need a testing platform to sort out issues across different devices, browsers and operating systems, to ensure maximum usability and minimal errors. &lt;/p&gt;

&lt;h4&gt;
  
  
  Enter Cross-Browser Testing
&lt;/h4&gt;

&lt;p&gt;The need for cross-browser testing has been around for some time now, but finding free ways to test your applications or websites across multiple browsers seems to be more and more difficult to do for free anymore. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This guide provides you with top tips for free cross-browser testing.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning WHAT To Test
&lt;/h2&gt;

&lt;p&gt;In a perfect world every device, operating system, and browser type and version would work flawlessly and error free. Initially, testing and bug fixing for EVERY browser may be too time consuming and resource intensive, and you may include more thorough browser support over time. &lt;/p&gt;

&lt;h5&gt;
  
  
  When deciding what to test first, start by:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;What device/operating system/browser combinations are the most commonly used for your audience&lt;/li&gt;
&lt;li&gt;User behavior across these common combinations, such as page drrop offs, lack of conversions, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Additional Reading:
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2016/02/high-impact-minimal-effort-cross-browser-testing/"&gt;Smashing Magazine: High Impact Minimal Effort Cross Browser Testing&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Free Testing Methods
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1. Download Different Browsers and Use Built In Dev-Tools
&lt;/h4&gt;

&lt;p&gt;This may seem like the most obvious solution. Why not download every browser you want to test, and see how they run! The Dev-Tools in some browsers even allow you to switch the version you are running (Internet Explorer 11), or the type of device you are using (many allow you to emulate that browser on multiple mobile device types such as an iPad or Android mobile phone). &lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Reading:
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/tools/chrome-devtools/device-mode/testing-other-browsers"&gt;Chrome DevTools: Emulate and Test Other Browsers&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developers.google.com/web/tools/chrome-devtools/device-mode"&gt;Google Chrome: Dev Tools - Device Mode&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode"&gt;Firefox: Responsive Design Mode&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/dn255001(v=vs.85)"&gt;Internet Explorer 11: Simulate Older Internet Explorer Versions&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Using Virtual Machines and Emulators With Different Browsers
&lt;/h4&gt;

&lt;p&gt;Sometimes just running a different browser instance doesn't test your project as thoroughly as needed. Running a browser such as MS Edge on a Windows device for example might behave differently than if it was run on a Mac. Many developers use Parallels, but thanks to &lt;a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/"&gt;MS Edge Developer tools&lt;/a&gt;, there are free virtual machine options that allow users to run different Internet Explorer versions on different Windows versions. IES 11 on Windows 7? Yep! MS Edge on Windows 10? Got that too!&lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Reading:
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/"&gt;MS Edge Developer Tools: Virtual Machines&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Using Cloud-Hosted Interactive Cross-Browser Testing Web-Apps
&lt;/h4&gt;

&lt;p&gt;Conveniently there are many interactive web-apps that provide cloud-hosted virtual machines that allow users to test their projects on a wide variety of device/operating system/browser combinations. Unfortunately there are no longer any completely free options for developers to use past a certain free trial period. There are two options that I am aware of though, that do offer unlimited free services of their cross-browser testing platform for open-source projects: &lt;a href="https://www.browserstack.com/"&gt;BrowserStack&lt;/a&gt; and &lt;a href="https://crossbrowsertesting.com/"&gt;CrossBrowserTesting&lt;/a&gt;. Both of these cross-browser testing web-apps provide users with a VERY robust selection of devices/operating systems/browsers, and allow live and interactive testing of your open-source project. There are considerations to take before making your project open-source, but depending on the project these can be a very quick and effective solution for your testing needs.&lt;/p&gt;

&lt;h5&gt;
  
  
  Additional Reading:
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/"&gt;BrowserStack&lt;/a&gt;&lt;br&gt;
&lt;a href="https://crossbrowsertesting.com/"&gt;CrossBrowserTesting&lt;/a&gt;&lt;br&gt;
&lt;a href="https://opensource.guide/starting-a-project/"&gt;Open Source Guide: Starting an Open Source Project&lt;/a&gt;&lt;br&gt;
&lt;a href="https://css-tricks.com/video-screencasts/106-browserstack/"&gt;CSS-Tricks: Use BrowserStack for Live Web-Based Cross Browser Testing&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Cross-browser testing is an important step to ensuring your app or website behaves across multiple combinations of devices/operating systems/browsers. Although not a completely simple task, I hope this blog post helps some of you with some free options for performing your own cross-browser testing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did I miss something?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;What is YOUR favorite free cross-browser testing tool?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>productivity</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
