<?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: Tiago Brito</title>
    <description>The latest articles on DEV Community by Tiago Brito (@britotiagos).</description>
    <link>https://dev.to/britotiagos</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%2F99968%2Fdf820276-3b15-447e-8d7b-ebaee9ca52dd.png</url>
      <title>DEV Community: Tiago Brito</title>
      <link>https://dev.to/britotiagos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/britotiagos"/>
    <language>en</language>
    <item>
      <title>How to create a teaser with styled-components and react</title>
      <dc:creator>Tiago Brito</dc:creator>
      <pubDate>Mon, 07 Mar 2022 08:21:18 +0000</pubDate>
      <link>https://dev.to/britotiagos/how-to-create-a-teaser-with-styled-components-and-react-3hi2</link>
      <guid>https://dev.to/britotiagos/how-to-create-a-teaser-with-styled-components-and-react-3hi2</guid>
      <description>&lt;p&gt;In my last article, I showed how to extend a button, modify it and use it anywhere on your app. In case you missed it, use the menu above and go to the previous article.&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%2Fov5gtq3k32bm782ojyam.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%2Fov5gtq3k32bm782ojyam.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, I will show you how to build a teaser from scratch, let's go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the files
&lt;/h2&gt;

&lt;p&gt;To give more structure to our code, we'll create two folders inside of each other:&lt;br&gt;
components -&amp;gt; teaser&lt;br&gt;
Inside the teaser folder, create a subfolder called &lt;strong&gt;teaser.js&lt;/strong&gt; file.&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%2Fmnyl3z65vyp9gu4ygbom.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%2Fmnyl3z65vyp9gu4ygbom.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating a basic component.
&lt;/h2&gt;

&lt;p&gt;Inside the &lt;em&gt;teaser.js&lt;/em&gt; create a basic component and export it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";

function Teaser() {
  return &amp;lt;div&amp;gt;teaser&amp;lt;/div&amp;gt;;
}

export default Teaser;

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

&lt;/div&gt;



&lt;p&gt;Inside the file &lt;em&gt;index.js&lt;/em&gt;, import the teaser and display it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from "styled-components";
import Teaser from "../src/components/teaser/teaser";

export const Box = styled.div`
  display: grid;
  grid-template-columns: 1fr;
  width: 500px;
  gap: 20px;
  margin-top: 100px;
  align-items: center;
`;

export default function Home() {
  return (
    &amp;lt;Box&amp;gt;
      &amp;lt;Teaser /&amp;gt;
    &amp;lt;/Box&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you run the website you should see the word "teaser" on the home page in your browser.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Open the VScode terminal and type &lt;code&gt;yarn dev&lt;/code&gt; and go to the following URL "&lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;" on your browser.&lt;/em&gt;&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%2Fkfxxkqcq7sd14ica2fpj.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%2Fkfxxkqcq7sd14ica2fpj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the teaser
&lt;/h2&gt;

&lt;p&gt;To improve the readability of the code we will have our components separated from the styles files.&lt;br&gt;
Inside the &lt;em&gt;styles.js&lt;/em&gt; file import styled from style-components &lt;code&gt;import styled from "styled-components";&lt;/code&gt;&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%2F6m2caz6lqfh0mx6go3n3.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%2F6m2caz6lqfh0mx6go3n3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create two style components, called &lt;strong&gt;TeaserContainer&lt;/strong&gt; and &lt;strong&gt;TextContainer&lt;/strong&gt;.&lt;br&gt;
Import both of them into the &lt;em&gt;teaser.js&lt;/em&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;export const TeaserContainer = styled.div``;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const TextContainer = styled.div``;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of importing each styled component separately from the styles file, we can import all the components simultaneously with a single import.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import {TeaserContainer,TextContainer} from "./styles";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Call the styled components &lt;code&gt;TeaserContainer&lt;/code&gt; and &lt;code&gt;TextContainer&lt;/code&gt; inside our component change the basic component we created earlier to the code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Teaser() {
  return (
    &amp;lt;TeaserContainer&amp;gt;
      &amp;lt;TextContainer&amp;gt;
       Placeholder text
      &amp;lt;/TextContainer&amp;gt;
    &amp;lt;/TeaserContainer&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We won't see any changes yet as we just created the shell for our components, let's start styling it.&lt;/p&gt;

&lt;p&gt;We will be using Grid (&lt;a href="https://css-tricks.com/snippets/css/complete-guide-grid/" rel="noopener noreferrer"&gt;How to use grid&lt;/a&gt;) to positioning. The TeaserContainer will have this CSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  display: grid;
  grid-template-columns: 1fr;
  box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While in the TextContainer will have this CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;

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

&lt;/div&gt;



&lt;p&gt;Now you should see something like this on your browser.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1mconajyc4k8z5od6kz.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%2Fg1mconajyc4k8z5od6kz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our teaser will have a title and descriptions as well, let's add it!&lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;styles.js&lt;/em&gt; file creates another two styled components, one called "Title" that will extend an &lt;code&gt;h2&lt;/code&gt; and the other called "Description" that will extend a &lt;code&gt;p&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;Inside each new styled component, you can add the following styles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Title = styled.h2`
  margin: 0;
  color: #5cc9e2;
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We won't add any styles in the description now, it will change later when we make it responsive.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Description = styled.p``;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import the 2 newly created components above to the index.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;import {
  TeaserContainer,
  TextContainer,
  Title,
  Description,
} from "./styles";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Call each one inside our main component, as seen below, and change the title and the description for something that you want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;TeaserContainer&amp;gt;
      &amp;lt;TextContainer&amp;gt;
        &amp;lt;Title&amp;gt;This is my first Teaser&amp;lt;/Title&amp;gt;
        &amp;lt;Description&amp;gt;
          I just built this nice teaser dor the first time ;)
        &amp;lt;/Description&amp;gt;
      &amp;lt;/TextContainer&amp;gt;
    &amp;lt;/TeaserContainer&amp;gt;
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fpk7ljqjf8yrdo5qdyu4v.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%2Fpk7ljqjf8yrdo5qdyu4v.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we just need to add the image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Image
&lt;/h2&gt;

&lt;p&gt;For the image, we will use the Image component from next.js, first we will import it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import Image from "next/image";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Find an image that you would like to use and add it to the public folder, import it in the &lt;em&gt;teaser.js&lt;/em&gt; file. I called my image &lt;code&gt;city.jpeg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import city from "../../../public/city.jpeg";&lt;/code&gt;&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%2Ft1fd1p6hemlgynaytzpo.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%2Ft1fd1p6hemlgynaytzpo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next we call the component just above the TextContainer component.&lt;br&gt;
&lt;code&gt;&amp;lt;Image alt="city" src={city} layout="intrinsic" responsive /&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;What it is&lt;/strong&gt;:&lt;br&gt;
&lt;em&gt;intrinsic&lt;/em&gt;: Scale down to fit width of container, up to image size.&lt;br&gt;
&lt;em&gt;Responsive&lt;/em&gt;: Scale to fit the width of the container&lt;/p&gt;

&lt;p&gt;You can check out other next.js image properties &lt;a href="https://nextjs.org/docs/api-reference/next/image#layout" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is it, we have our teaser.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnxstu3o2u35n1aeidga.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%2Flnxstu3o2u35n1aeidga.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Making the teaser responsive.
&lt;/h2&gt;

&lt;p&gt;We are going to use media queries to work with the responsiveness of our teaser.&lt;/p&gt;

&lt;p&gt;To make our teaser 50% image and 50% text we need to make the grid two columns and also add a gap so it does not stick together.&lt;/p&gt;

&lt;p&gt;In the styled component &lt;em&gt;TeaserContainer&lt;/em&gt; add the following just below the &lt;code&gt;background: #fff;&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; @media (min-width: 700px) {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are saying to the browser to render those two properties when the screen has a minimum width of &lt;code&gt;700px&lt;/code&gt;, so the browser will ignore those previous styles for the same two properties(If there is any) and will use the new ones set inside the media query.&lt;/p&gt;

&lt;p&gt;You should see your image on the left-hand side and the text on the right-hand side.&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%2Fmu5qpcwaqolyqll5igpg.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%2Fmu5qpcwaqolyqll5igpg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And we are all done, we have a Teaser responsive for 2 breakpoints, one from 0 to 700px and another from 701px to infinite.&lt;/p&gt;

&lt;p&gt;There are some tweaks we can do to make it better, like adding more breakpoints and adding a maximum height to the image, the latter is not recommended as it could break the teaser, for instance, if you have a long description.&lt;br&gt;
There are some other technics that we can use to prevent this issue from happening but it is out of the scope of this article.&lt;/p&gt;
&lt;h3&gt;
  
  
  Tip:
&lt;/h3&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%2Fbyr0qveh5z0ykwbcqqfg.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%2Fbyr0qveh5z0ykwbcqqfg.png" alt="Image description"&gt;&lt;/a&gt;&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%2Fbrg4fygaobiq6ztz8h42.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%2Fbrg4fygaobiq6ztz8h42.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope these articles can help you build your next app.&lt;/p&gt;

&lt;p&gt;"This" is my teaser 😁 &lt;iframe src="https://open.spotify.com/embed/track/4ewITE1jhakdoKhXQiSX5z" width="100%" height="80px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Have a great day 😉&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using props on styled-component and next.js</title>
      <dc:creator>Tiago Brito</dc:creator>
      <pubDate>Thu, 24 Feb 2022 10:58:18 +0000</pubDate>
      <link>https://dev.to/britotiagos/using-props-on-styled-component-and-nextjs-51lk</link>
      <guid>https://dev.to/britotiagos/using-props-on-styled-component-and-nextjs-51lk</guid>
      <description>&lt;p&gt;&lt;em&gt;If you landed here and don't know how to install and use style component you can start with this &lt;a href="https://dev.to/britotiagos/how-add-style-components-to-nextjs-and-start-using-it-4kdf"&gt;articles here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In today's article, we'll talk a little bit about props.&lt;br&gt;
&lt;strong&gt;Props&lt;/strong&gt; is a React special keyword that stands for &lt;strong&gt;properties&lt;/strong&gt; and it is used to pass data between components.&lt;/p&gt;

&lt;p&gt;The styled-component lets you use props and change the CSS with it, as well as do other things that are out of the scope for today. &lt;/p&gt;

&lt;p&gt;For instance, if props are "primary" change these colours, so you can dynamically change your button based on anything that you want.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do we use those Props?
&lt;/h2&gt;

&lt;p&gt;For instance, create a button that will have the following CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Button = styled.button`
 cursor: pointer;
 padding: 15px 22px;
 border-radius: 24px;
 border: none;
 font-weight: 500;
 color: #fff;
 background: #0096c7;
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Remember to import the styled from the styled component at the top of your file, like this&lt;/em&gt;. 👇&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import styled from "styled-components";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But we want another button that will have the same CSS as the previous one but with a different background colour.&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%2Fjaujaci8emyrsp7o64aa.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%2Fjaujaci8emyrsp7o64aa.png" alt="Image of two buttons with different background colours" width="376" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To achieve this we can use props, passing a prop called "secondary" to the second button.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;Button secondary&amp;gt;Secondary&amp;lt;/Button&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the CSS for that button we need to add the code below,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;background: ${(props) =&amp;gt; (props.secondary ? "#f00" : "#00a8ff")};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The code above has a function that gets props, we can target that &lt;em&gt;secondary&lt;/em&gt; prop, like this &lt;code&gt;props.secondary&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Secondary on this instance is a boolean, and if this exists, so the secondary is &lt;code&gt;true&lt;/code&gt;, it will return the first value &lt;code&gt;"#f00"&lt;/code&gt; otherwise will use the second value &lt;code&gt;"#00a8ff"&lt;/code&gt; 🤯&lt;/p&gt;

&lt;p&gt;In the end, our file will look something like this 👇&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7wb8d8uraggnyt2l83s.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%2Fe7wb8d8uraggnyt2l83s.png" alt="Image description" width="668" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is useful if you want to change only one or 2 props, but what happens when you need to change half of the styles? &lt;/p&gt;

&lt;p&gt;It can be a bit too repetitive to type that whole thing over and over for each of the CSS properties that you want to change.&lt;/p&gt;

&lt;p&gt;For that, we can use props and change everything at once, even add new CSS to it if we wish.&lt;br&gt;
To achieve that we can add the code below 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ${(props) =&amp;gt;
 props.secondary &amp;amp;&amp;amp;
 `
 background: #f00;
 color: #00a8; 
 border-radius: 0
 `};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your code should look like this&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gqnbqu9g92eascp4lvp.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%2F7gqnbqu9g92eascp4lvp.png" alt="Image with the code above" width="425" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some people will find this a bit too hard to read, but if you have the correct format or styles in your code editor it will become easy to read.&lt;/p&gt;

&lt;p&gt;In the end, your code will look like this&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wrgo7ndxj2ysiar7rxw.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%2F5wrgo7ndxj2ysiar7rxw.png" alt="Image with the whole code as it appears in the code editor" width="501" height="881"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Yes I did add a &lt;code&gt;Box&lt;/code&gt; there to centre everything, but it is not important for our example here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is Props folks &lt;iframe src="https://open.spotify.com/embed/track/73U87n7swRHpbX0deEpxcJ" width="100%" height="80px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What is next?
&lt;/h2&gt;

&lt;p&gt;In the next article, we will explore how to build a teaser that can be used across the website.&lt;/p&gt;

&lt;p&gt;Stay tuned 👋&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to add Style-components to Next.js and start using it 🤪</title>
      <dc:creator>Tiago Brito</dc:creator>
      <pubDate>Tue, 15 Feb 2022 22:09:27 +0000</pubDate>
      <link>https://dev.to/britotiagos/how-add-style-components-to-nextjs-and-start-using-it-4kdf</link>
      <guid>https://dev.to/britotiagos/how-add-style-components-to-nextjs-and-start-using-it-4kdf</guid>
      <description>&lt;p&gt;In this tutorial, I'll show you how to add Styled-component to Next.js. If you don't know how to create a basic app with Next.js I'll suggest to you first read &lt;a href="https://dev.to/britotiagos/how-to-create-a-basic-app-with-nextjs-h8k"&gt;this post here&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  For this tutorial, I'll use:
&lt;/h5&gt;

&lt;p&gt;&lt;em&gt;I'll use VSCode for our example here, but you can use any other code editor that you prefer.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to instal Styled Component? 🤔
&lt;/h2&gt;

&lt;p&gt;On your terminal go to your folder project.&lt;br&gt;
if you are using &lt;code&gt;npm&lt;/code&gt; run:&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 --save styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you are using &lt;code&gt;yar&lt;/code&gt; run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PS: If you use &lt;code&gt;yarn&lt;/code&gt; it is recommended that you go to your package.json file and add the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "resolutions": {
    "styled-components": "^5"
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is to avoid many problems that can happen from multiple versions of styled components being used on your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fp1hdazkosgvcfvpco508.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fp1hdazkosgvcfvpco508.png" alt="Image showing where to add the code above" width="800" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations 👏 🎉 you add Styled-component to your project, easy right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Well, how do I use it now?🤔
&lt;/h2&gt;

&lt;p&gt;Styled components use tagged templates literal to style your components. So you can give names to H1, p, button tags and so on, it helps to debug and make your code much cleaner to read in my opinion.&lt;/p&gt;

&lt;p&gt;So instead of having a component like this👇&lt;br&gt;
&lt;a href="https://media2.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%2F664nq4gsy1d8btw2lc5l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F664nq4gsy1d8btw2lc5l.png" alt="Image with sample of old style" width="552" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can have it like this👇&lt;br&gt;
&lt;a href="https://media2.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%2F9fbezf94n7q079dqnany.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F9fbezf94n7q079dqnany.png" alt="Image with sample of new styles" width="502" height="177"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  But how do we do it?🤔
&lt;/h5&gt;

&lt;p&gt;Simple, first we need to import the style from the styled component like so 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from "styled-components";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then export a const with the name you choose with the styled template literal like below 👇&lt;br&gt;
&lt;a href="https://media2.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%2Fskahwvnfgx5qe83scuwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fskahwvnfgx5qe83scuwd.png" alt="Image description" width="381" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So your file will look like this 👇&lt;br&gt;
&lt;a href="https://media2.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%2Fpixaa82re0edsq59p5mv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpixaa82re0edsq59p5mv.png" alt="Image showing how the file should look like" width="556" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then styled components will generate the tags and add unique classes to your tags.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fpbrn78e914gipizw1l3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpbrn78e914gipizw1l3p.png" alt="Image showing the class names with a random code" width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But it also makes it super hard to debug later, as you just have an h1 or div and trying to find which one is not working will be crazy.&lt;/p&gt;

&lt;p&gt;To solve this issue we can run in our terminal the following:&lt;br&gt;
&lt;em&gt;If you use &lt;code&gt;yarn&lt;/code&gt;&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;yarn add babel-plugin-styled-components --dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;If you use &lt;code&gt;npm&lt;/code&gt;&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 --save-dev babel-plugin-styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will need to create a file called &lt;code&gt;.babelrc&lt;/code&gt; at the root of our project.&lt;br&gt;
and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "presets": ["next/babel"],
  "plugins": [["styled-components", { "ssr": true, "displayName": true }]]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fwjsbq0zu81uscc1925rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fwjsbq0zu81uscc1925rn.png" alt="Image showing the file to be changed" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and voila 💃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fsr3zw2por7trnwsotb29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fsr3zw2por7trnwsotb29.png" alt="Image showing that the class name has the component name in it." width="800" height="633"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the const name we created &lt;strong&gt;Title&lt;/strong&gt; will be added to our tags as part of the class names, making our lives so much easier &lt;/p&gt;

&lt;p&gt;Now for the real &lt;strong&gt;congratulations&lt;/strong&gt; 👏 🎉 👏 🎉&lt;br&gt;
We just added styled components to our project and learned how to start using them.&lt;/p&gt;

&lt;p&gt;We are the champions&lt;iframe src="https://open.spotify.com/embed/track/4kzvAGJirpZ9ethvKZdJtg" width="100%" height="80px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What next?
&lt;/h2&gt;

&lt;p&gt;Well, this is just the tip of the iceberg, Styled components have so much more to be explored that I'll have new posts about it soon.&lt;/p&gt;

&lt;p&gt;Until next time 👋&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>react</category>
      <category>css</category>
    </item>
    <item>
      <title>How to create a basic app with Next.js</title>
      <dc:creator>Tiago Brito</dc:creator>
      <pubDate>Tue, 15 Feb 2022 12:59:08 +0000</pubDate>
      <link>https://dev.to/britotiagos/how-to-create-a-basic-app-with-nextjs-h8k</link>
      <guid>https://dev.to/britotiagos/how-to-create-a-basic-app-with-nextjs-h8k</guid>
      <description>&lt;p&gt;Hello dev 👋&lt;/p&gt;

&lt;p&gt;In this article, I'll show you how to create a basic APP with next.js&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Next.js? 🤔
&lt;/h2&gt;

&lt;p&gt;Next.js is an open-source framework built by the Vercel team on top of Node.js, it does enable React applications to server-side render and generate static websites.&lt;br&gt;
React does endorse Next.js as one of the "Recommended Toolchains" in their official documentation for developers that are looking for solutions when  "Building a server-rendered website with Node.js", so I guess we are on the right track here.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to install Next.js?🤔
&lt;/h2&gt;

&lt;p&gt;I'll use &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code (AKA VSCode)&lt;/a&gt; for our sample here, but you can use any other code editor that you prefer.&lt;/p&gt;

&lt;p&gt;Open VSCode and open the explorer panel on the left-hand side.&lt;br&gt;
Click &lt;code&gt;open folder&lt;/code&gt; and create a new folder where you will have your project.&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%2F8imdyalz1059cgw4p2fm.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%2F8imdyalz1059cgw4p2fm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a new folder and open it, your VSCode may "refresh", this is normal.&lt;/p&gt;

&lt;p&gt;Open VSCode terminal, this terminal is the same as you have on your computer but it already put you in the correct folder for your project.😉&lt;/p&gt;

&lt;p&gt;To open the terminal on VSCode&lt;br&gt;
&lt;em&gt;PS: You can use the shortcut you can see on the right-hand side.&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqew6ccyppj8eyigo2oid.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%2Fqew6ccyppj8eyigo2oid.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rrun the following command (&lt;strong&gt;Choose one&lt;/strong&gt;) &lt;br&gt;
&lt;em&gt;PS: if you don't know the difference don't worry I'll have an article explaining the difference soon.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npx create-next-app@latest


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

&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

yarn create next-app


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

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;you can use any of the codes above to install Next.js&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once you run the command above you will have to give a name to your project, you can choose anything, is better to give a proper name from the start, but don't worry too much, for now, this one is just for fun.&lt;/p&gt;

&lt;p&gt;After the installation is done, navigate to the folder created by Next.js with the name you gave to your app with the command below, changing &lt;code&gt;myAppName&lt;/code&gt; for your app name.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

cd myAppName


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

&lt;/div&gt;
&lt;p&gt;After you can run the following command to start the server and see your site.&lt;/p&gt;

&lt;p&gt;If you choose &lt;code&gt;npx creat ....&lt;/code&gt; above 👆 is better to use the code below.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm run dev


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

&lt;/div&gt;
&lt;p&gt;If you choose &lt;code&gt;yarn creat ....&lt;/code&gt; above 👆 us this code:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

yarn dev


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

&lt;/div&gt;
&lt;p&gt;On your browser go to &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; to view your application.&lt;/p&gt;

&lt;p&gt;And to edit what you see you can edit the code inside the file &lt;code&gt;pages/index.js&lt;/code&gt;.&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%2Fjaln87lqpoyec77lnkbn.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%2Fjaln87lqpoyec77lnkbn.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Once you save it you can see the changes on your browser.🎉&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%2Fkm9ksi0qy8kq7jnhhcpw.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%2Fkm9ksi0qy8kq7jnhhcpw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Congratulations 👏🎉
&lt;/h4&gt;

&lt;p&gt;you just made your first app &lt;/p&gt;

&lt;p&gt;You are The Best&lt;iframe src="https://open.spotify.com/embed/track/6pPWRBubXOBAHnjl5ZIujB" width="100%" height="80px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What next?
&lt;/h2&gt;

&lt;p&gt;Next.js has many samples and boilerplates, I'll cover a few of them soon, so we can have some fun learning how to build a blog, how to use Styled-Component and how to use a Content management system (CMS).&lt;/p&gt;

&lt;p&gt;See you next time 😉&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>tutorial</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
