<?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: Pushkar Thakur</title>
    <description>The latest articles on DEV Community by Pushkar Thakur (@push9828).</description>
    <link>https://dev.to/push9828</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%2F305657%2F08638535-f733-49a4-bcfa-d21cfce6f94f.png</url>
      <title>DEV Community: Pushkar Thakur</title>
      <link>https://dev.to/push9828</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/push9828"/>
    <language>en</language>
    <item>
      <title>Everything New In React 18</title>
      <dc:creator>Pushkar Thakur</dc:creator>
      <pubDate>Tue, 15 Jun 2021 15:22:58 +0000</pubDate>
      <link>https://dev.to/push9828/everything-new-in-react-18-2mlf</link>
      <guid>https://dev.to/push9828/everything-new-in-react-18-2mlf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;React 18 Alpha is here there are many things that got added in react 18 as react 17 there really wasn't much added But it's definitely not a case with react 18 In this article we will look at some of the top updates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  What's new?
&lt;/h5&gt;

&lt;h2&gt;
  
  
  1.The New Root API :
&lt;/h2&gt;

&lt;p&gt;Here’s what we’re used to seeing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;root&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We pass reactDOM.render our App component and then &lt;code&gt;document.getElementById&lt;/code&gt; and our root element. So we’re rendering our app component into our root element on the page pretty simple.&lt;/p&gt;

&lt;p&gt;Here’s the new way&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;Const&lt;/span&gt; &lt;span class="nx"&gt;root&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createRoot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;root&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="nx"&gt;root&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have a root variable which is equal to the new method called create root. This is being passed our root element and then we call root.render and pass our app component.&lt;/p&gt;

&lt;p&gt;Our app component it’s accomplishing the same thing but in a different way. The old way called the legacy root API and it’s still going to work in react 18 but will be deprecated at some point by using the new root API you’re going to get access to all of the react 18 improvements including the concurrent features that we’re going to talk about in this article. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Suspense :
&lt;/h2&gt;

&lt;p&gt;In this update we’re going to get full support for suspense. Now what is suspense as the name implies it suspends something until it’s ready to be rendered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Loading….&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ComponentFetchingData&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt; 
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AnotherComponent&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example we have a component that needs time to fetch data before it’s ready to be rendered suspense will use the fallback until the data is returned and the components are rendered.&lt;/p&gt;

&lt;p&gt;It's important to note here that the random component here is not waiting on data but it’s still going to be suspended until everything inside the suspense is ready to be rendered.&lt;/p&gt;

&lt;p&gt;Now suspense is going to be extremely useful with server side rendering currently with ssr you’re going to get fully rendered html but your browser still has to load the javascript and hydrate the entire page before it can become interactive suspense could speed up this load time dramatically using the example from the react 18.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NavBar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Sidebar&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RightPane&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Spinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Comment&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;RightPane&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Layout&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above we have a page loading a navbar, a sidebar, a post and a comment. Now we really don’t need the comments to load before the site becomes interactive so we’re going to suspend the comments so that the viewer can start reading the article and then we’ll load the comments in the background.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Automatic Batching :
&lt;/h2&gt;

&lt;p&gt;In react 17 and earlier react with batch re-render updates during a browser event like a click.&lt;/p&gt;

&lt;p&gt;React 17 will not batch the re-renders if you need to fetch data and then update the state.  With react 18 if you use the new create root API all state updates will automatically be batched no matter when they happen.&lt;/p&gt;

&lt;p&gt;If there is some critical component you don’t want to batch. You can opt out of this using &lt;code&gt;ReactDOM.flushSync()&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. startTransition API :
&lt;/h2&gt;

&lt;p&gt;This is a new API introduced with this release, which helps in keeping the current webpage responsive and being able to do heavy non-blocking UI updates at the same time.&lt;/p&gt;

&lt;p&gt;This will tell react which updates are urgent and which can wait this will help the UI remain responsive.&lt;/p&gt;

&lt;p&gt;For urgent updates like typing, hover, clicking, we call props/functions usually like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;setText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For non-urgent or heavy UI updates, we can wrap it in a startTransition API as :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;startTransition&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="nx"&gt;setText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Suspense List :
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;&amp;lt;SuspenseList /&amp;gt;&lt;/code&gt; takes in &lt;code&gt;revealOrder&lt;/code&gt; prop with values forward, backward or together&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SuspenseList&lt;/span&gt; &lt;span class="na"&gt;revealOrder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"forwards"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LoadingSpinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;CardComponent&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LoadingSpinner&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;CardComponent&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SuspenseList&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the card component will be revealed in a forward direction(until the data is fetched, will fell back to LoadingSpinner Component). Similarly, &lt;code&gt;backwards&lt;/code&gt; will reveal Cards in reverse order, and together prop will render everything "together".&lt;/p&gt;

&lt;h2&gt;
  
  
  6. useDeferredValue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deferredValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useDeferredValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;useDeferredValue&lt;/code&gt; takes in the state value and a timeout in ms and Returns a deferred version of the value that may “lag behind” it for at most timeoutMs.&lt;/p&gt;

&lt;p&gt;This is commonly used to keep the interface responsive when you have something that renders immediately based on user input and something that needs to wait for a data fetch.&lt;/p&gt;

&lt;p&gt;We can install React 18 and reactDOM right away using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;alpha&lt;/span&gt; &lt;span class="nx"&gt;reactDOM&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;alpha&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wrapping Up
&lt;/h3&gt;

&lt;p&gt;React 18 is an alpha release right now and not suitable for production but it is always better to start learing about these features now. &lt;/p&gt;

&lt;p&gt;React 18 will go into public beta in a few months.&lt;/p&gt;

&lt;p&gt;Thank You for reading. Signing off 🙌.&lt;/p&gt;

&lt;p&gt;Feel free to reach out 👇&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;GitHub: &lt;a href="https://github.com/Push9828"&gt;https://github.com/Push9828&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/PushkarThakur28"&gt;https://twitter.com/PushkarThakur28&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="http://www.linkedin.com/in/pushkarthakur28"&gt;www.linkedin.com/in/pushkarthakur28&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Serverless on AWS</title>
      <dc:creator>Pushkar Thakur</dc:creator>
      <pubDate>Sun, 28 Mar 2021 14:18:34 +0000</pubDate>
      <link>https://dev.to/push9828/serverless-on-aws-4jn0</link>
      <guid>https://dev.to/push9828/serverless-on-aws-4jn0</guid>
      <description>&lt;p&gt;In recent years, the serverless computing model has emerged as a disruptive architectural approach for developing modern apps, utilities, and backend solutions. It helps developers to focus on code rather than spending time in the configuration, managing, or scaling of backend infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is serverless
&lt;/h3&gt;

&lt;p&gt;Serverless allows you to build and run applications without giving a thought about the server. The provisioning, administration, and scaling of the application server are all managed dynamically by the Serverless cloud provider.&lt;/p&gt;

&lt;p&gt;There are two types of serverless computing models. The first type refers to web and mobile application which leverage the cloud services for managing the server-side logic. It is known as Backend-as-a-service(BaaS). &lt;/p&gt;

&lt;p&gt;The second type is Function-as-a-service(FaaS). In FaaS handling backend infrastructure such as containers, runtime environments. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why use serverless
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No server management: Left the worries of provision or maintain any servers.&lt;/li&gt;
&lt;li&gt;Flexible scaling: Your application will scale automatically.&lt;/li&gt;
&lt;li&gt;Pay for value: Pay only for what you use rather than paying for the server unit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  An overview of Serverless AWS services
&lt;/h3&gt;

&lt;p&gt;AWS has more than 165 services that cover the major aspects and requirements of backend development like computing resources, security, Machine learning, messaging and monitoring services, databases of specific needs, and many more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5DrJ9-U2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j504ypwqdvhheexilss7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5DrJ9-U2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j504ypwqdvhheexilss7.png" alt="Serverless AWS services"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Compute
&lt;/h4&gt;

&lt;p&gt;With &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"&gt;AWS Lambda&lt;/a&gt; you can run code virtually any type of application or backend service - all with zero administration. You can execute code as a function triggers by various events like file update in S3 bucket, request on AWS API Gateway, operations on Dynamo DB table. AWS Lambda is a FaaS solution. You can combine Lambda with many other services of AWS and used it in many scenarios, like real-time file processing in S3, real-time stream processing, to handle the HTTP requests from API in mobile and web applications&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html"&gt;AWS Fargate&lt;/a&gt; you can run containers without having to manage servers and clusters. Fargate improves security through application isolation by design. You don’t need to optimize the server utilization, manage cluster scheduling. Fargate provides rich observability of applications with the help of Amazon CloudWatch Container Insights. To launch your application&lt;br&gt;
Specify the CPU and memory requirements, define network and IAM policies.&lt;/p&gt;

&lt;h4&gt;
  
  
  Messaging
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html"&gt;Amazon Simple Queue Service(SQS)&lt;/a&gt; is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. Get started with SQS in minutes using the AWS console, Command Line Interface or SDK of your choice, and three simple commands. &lt;/p&gt;

&lt;p&gt;SQS offers two types of message queues. Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery, and FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/sns/latest/dg/welcome.html"&gt;Amazon Simple Notification Service (SNS)&lt;/a&gt; is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication.&lt;/p&gt;

&lt;p&gt;With the help of SNS, you can send messages directly to millions of users. Besides the push notification, you can deliver notifications by email, SMS, or HTTP endpoint.&lt;/p&gt;

&lt;h4&gt;
  
  
  Integration
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/de_de/apigateway/latest/developerguide/welcome.html"&gt;Amazon API Gateway&lt;/a&gt; is a fully managed service for creating, publishing, maintaining, monitoring, and secure APIs at any scale. You can create RESTful APIs and WebSocket APIs that enable real-time communication applications with the help of API Gateway.&lt;/p&gt;

&lt;p&gt;API Gateway provides powerful, flexible authentication mechanisms, such as AWS Identity and Access Management policies, Lambda approver functions, and Amazon Cognito user pools.&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html"&gt;AWS Step Function&lt;/a&gt; you can orchestrate the sequence of AWS Lamdba functions and multiple AWS services into business-critical applications. Step Functions is based on a state machine. A task is a state in a workflow that represents the single component of the application.&lt;br&gt;
All tasks are automatically triggered, tracked, and retried if an error came up. So that application executes smoothly.&lt;/p&gt;

&lt;h4&gt;
  
  
  Security
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html"&gt;Amazon Cognito&lt;/a&gt; is a fully managed and cost-efficient sign-up/sign-in service, which provides users authentication, authorization, and management for web and mobile applications. The two main components of Amazon Cognito are user pools and identity pools. User pools are user directories that provide sign-up and sign-in options for your app users. Identity pools enable you to grant your users access to other AWS services. You can use identity pools and user pools separately or together.&lt;/p&gt;

&lt;p&gt;With Amazon Cognito, users can sign in through social identity providers such as Google, Facebook and through enterprise identity providers such as SAML and OpenID Connet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/overview.html"&gt;AWS Key Management Service (KMS)&lt;/a&gt; is a fully-managed service that allows you to create and manage cryptographic keys and control their use across your application and AWS services. AWS KMS is integrated with most other AWS services that encrypt your data for security. AWS KMS customer master keys (CMKs) controls access to data encryption. &lt;/p&gt;

&lt;p&gt;By using AWS KMS, you gain more control over access to data you encrypt. You can use the key management and encryption feature directly in your application.&lt;/p&gt;

&lt;h4&gt;
  
  
  Monitoring
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html"&gt;Amazon CloudWatch&lt;/a&gt; is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides the matrics about every AWS service you use. You will get the data and actionable insights to monitor your applications, respond to system-wide performance changes, optimize resource utilization and operational health. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/quicksight/latest/user/welcome.html"&gt;Amazon QuickSight&lt;/a&gt; is a scalable, serverless, embeddable, machine learning-powered business intelligence (BI) service built for the cloud. QuickSight provides AWS data, third-party data, big data, spreadsheet data, SaaS data, B2B data, and more on a single dashboard. You can embed it with your applications, portals, or websites to receive your own self-service analytics. &lt;/p&gt;

&lt;h4&gt;
  
  
  Database
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html"&gt;Amazon DynamoDB&lt;/a&gt; is a fully managed NoSQL database that supports key-value and document structure. DynamoDB lets you offload the administrative burdens of operating and scaling so that you don't have to worry about hardware provisioning, setup, and configuration, replication, software patching, or cluster scaling. It has single-digit millisecond latency. DynamoDB is a great choice for many serverless applications on AWS. It goes hand in hand with other AWS services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"&gt;Amazon Aurora&lt;/a&gt; is a fully managed relational database engine that's compatible with MySQL and PostgreSQL. Amazon Aurora is up to five times faster than standard MySQL databases and three times faster than standard PostgreSQL databases. It automates and standardizes database clustering and replication which are the most challenging aspects of the database. Aurora is also available in an on-demand autoscaling configuration which is called Amazon &lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html"&gt;Aurora Serverless&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Analytics
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/streams/latest/dev/introduction.html"&gt;Amazon Kinesis&lt;/a&gt; is a fully managed and data stream service to collect and process large streams of data records in real-time. With Amazon Kinesis, you can ingest real-time data such as video, audio, application logs, website clickstreams, and IoT telemetry data for machine learning, analytics, and other applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/athena/latest/ug/what-is.html"&gt;Amazon Athena&lt;/a&gt; is an interactive query service with the help of standard  SQL it analyzes data directly in Amazon Simple Storage Service(Amazon S3). there is no infrastructure to set up or manage, and you pay only for the queries you run. Athena can run queries in parallel so results are fast even with a large dataset.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;AWS provides many services which can be used for building applications with any workload. Developers and solution architects have a huge range of tools to implement backend applications in an effective way. Important aspects like high availability, automatic scalability, security, and durability are built-in. With the pay-as-you-use pricing model, the upfront cost is zero and there is no binding. Which makes serverless architectures very cost-effective.&lt;/p&gt;

&lt;p&gt;Thank you for reading. Signing off 🙌.&lt;/p&gt;

&lt;h4&gt;
  
  
  Feel free to reach out 👇
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;GitHub: &lt;a href="https://github.com/Push9828"&gt;https://github.com/Push9828&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/PushkarThakur28"&gt;https://twitter.com/PushkarThakur28&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="http://www.linkedin.com/in/pushkarthakur28"&gt;www.linkedin.com/in/pushkarthakur28&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>What is AWS Amplify</title>
      <dc:creator>Pushkar Thakur</dc:creator>
      <pubDate>Wed, 24 Mar 2021 05:45:34 +0000</pubDate>
      <link>https://dev.to/push9828/what-is-aws-amplify-4f28</link>
      <guid>https://dev.to/push9828/what-is-aws-amplify-4f28</guid>
      <description>&lt;p&gt;Amazon Web Services is &lt;a href="https://dzone.com/articles/who-is-leading-among-the-big-three-aws-vs-azure-vs"&gt;leading platform in the cloud&lt;/a&gt; universe. Back at &lt;a href="https://aws.amazon.com/new/reinvent/"&gt;re:invent 2018&lt;/a&gt;, Amazon had unveiled a range of products for mobile, web, IoT, databases, and more. &lt;/p&gt;

&lt;p&gt;AWS has many services that cover all needs from a small enterprise to big enterprise business use cases. One such service is AWS Amplify.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Amplify&lt;/strong&gt; is a set of tools and services to provide a declarative interface for client developers who want to perform everyday tasks in a scalable and secure way using cloud services. It provides users with the flexibility to select the platform they are most comfortable building with and is especially beneficial when it comes to front-end development.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does it offer?
&lt;/h2&gt;

&lt;p&gt;Amazon Amplify framework is a library, command-line interface, UI component that allows the creation of frontend and its integration with backend lot smoother. Ultimately, it provides full layer development without having to worry about iterations and backend configurations. Here are some features from the many&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;: Amplify auth lets you set up user authentication flow with user directory. It provides pre-built UI components too.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Store&lt;/strong&gt;: With the help of UI you can define backend models, fields, and the relationship between the objects. Authorization rules are built-in in the data model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atomic Deployments&lt;/strong&gt;: It offers fully managed services for hosting static web applications and deploying with a built-in CI/CD workflow that helps to accelerate the application release cycle.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of using Amplify
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy and UI driven Development&lt;/strong&gt;: It provides a simple fast and modern UI-driven approach to build web and mobile applications. You get some UI components out-of-the-box that speed up the development cycle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backend Support&lt;/strong&gt;: It improves the app performance by offering built-in backend support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Usage-Based Payment&lt;/strong&gt;: Like other paid services of AWS. The payment model is very cost-efficient as you only pay for the services you use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It’s Free to Start&lt;/strong&gt;: It has a very impressive free tier. You can use it for your initial projects or side projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web-Based Analytics&lt;/strong&gt;: It comes with an analytics dashboard it is very useful for developers, designers, and project managers. It offers in-app metrics too.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS amplify supports iOS, Android, Web, and React Native mobile apps, and React, Ionic, Angular, and vue.js for web apps.&lt;/p&gt;

&lt;p&gt;The AWS amplify is great for those who don't want to build their backend or other components from scratch. amplify components make it easy to set up the building blocks of your app on your own without all the legwork.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases of AWS Amplify
&lt;/h2&gt;

&lt;p&gt;Here are just a few of them. If you have more in mind feel free to add in comment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you want to build cloud-connected applications on the web and mobile platforms.&lt;/li&gt;
&lt;li&gt;When you want to use javascript in mobile app development.&lt;/li&gt;
&lt;li&gt;When you don't want to enter into the hassle of maintaining servers and backend service.&lt;/li&gt;
&lt;li&gt;When you want scalability and faster app development.&lt;/li&gt;
&lt;li&gt;When you want to give more with cloud in your existing app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How much it cost?
&lt;/h2&gt;

&lt;p&gt;AWS Amplify comes with the following price structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy and UI driven Development&lt;/strong&gt;: It provides a simple fast and modern UI-driven approach to build web and mobile applications. You get some UI components out-of-the-box that speed up the development cycle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backend Support&lt;/strong&gt;: It improves the app performance by offering built-in backend support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Usage-Based Payment&lt;/strong&gt;: Like other paid services of AWS. The payment model is very cost-efficient as you only pay for the services you use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It’s Free to Start&lt;/strong&gt;: It has a very impressive free tier. You can use it for your initial projects or side projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web-Based Analytics&lt;/strong&gt;: It comes with an analytics dashboard it is very useful for developers, designers, and project managers. It offers in-app metrics too.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OZ9NEo-z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d87zic7s2dkz4l33dtvk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OZ9NEo-z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d87zic7s2dkz4l33dtvk.png" alt="blog 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AWS amplify supports iOS, Android, Web, and React Native mobile apps, and React, Ionic, Angular, and vue.js for web apps.&lt;/p&gt;

&lt;p&gt;The AWS amplify is great for those who don't want to build their backend or other components from scratch. amplify components make it easy to set up the building blocks of your app on your own without all the legwork.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much it cost?
&lt;/h2&gt;

&lt;p&gt;AWS Amplify comes with the following price structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free Tier&lt;/strong&gt;: It is one of the first payment methods which can also be called a trial period of 12 months(with certain limitations). &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pay As you Go Model&lt;/strong&gt;: For build/deploy it’s $0.01 per build minute, $0.023 per GB of storage per month, and $0.15 for every GB served.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Mobile and web developers could not have asked much from AWS Amplify. As it is packed with so many built-in features such as authentication, notifications, and APIs can all be made with a minimum amount of work. &lt;/p&gt;

&lt;p&gt;If you want to deploy secure and efficient applications quickly without managing the underlying infrastructure, give AWS a chance - you won't be disappointed! &lt;/p&gt;

&lt;p&gt;Thank You for reading. Signing off 🙌.&lt;/p&gt;

&lt;h4&gt;
  
  
  Feel free to reach out 👇
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;GitHub: &lt;a href="https://github.com/Push9828"&gt;https://github.com/Push9828&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/PushkarThakur28"&gt;https://twitter.com/PushkarThakur28&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="http://www.linkedin.com/in/pushkarthakur28"&gt;www.linkedin.com/in/pushkarthakur28&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>webdev</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Flex of flexbox</title>
      <dc:creator>Pushkar Thakur</dc:creator>
      <pubDate>Wed, 03 Feb 2021 05:15:08 +0000</pubDate>
      <link>https://dev.to/push9828/flex-of-flexbox-jd8</link>
      <guid>https://dev.to/push9828/flex-of-flexbox-jd8</guid>
      <description>&lt;p&gt;The way you represent the content on your website or on the company website tells almost everything about your product or whatever the website is representing. It doesn’t matter even if you have great content but if that’s not displayed in a proper way then it doesn't serve the purpose of the existing content. So, showing content in a user-friendly way is very important.&lt;/p&gt;

&lt;p&gt;From the early days of browsers, CSS is playing a significant role in web development and we are improving ourselves along with the regular updates coming to CSS and web. It is getting simpler and more efficient to provide new experiences on web pages. &lt;/p&gt;

&lt;p&gt;Now let's jump to the main topic, we have two CSS layout systems - &lt;strong&gt;Flexbox&lt;/strong&gt; and &lt;strong&gt;CSS Grid&lt;/strong&gt;. I personally prefer using both of them to unlock the full potential of CSS. In this article, we will dive in and discuss flexbox. And at the end, we will see how to use CSS Grid and flexbox together and create amazing user experiences and improve the look and feel of the web applications.&lt;/p&gt;

&lt;p&gt;The basic thing while getting started with the flexbox is you need a flex container, which will work as a parent container in which we will be setting the basic structure of display, using Set &lt;code&gt;display: flex&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%2Fi%2Fa3xqecep1hh33z1c1qb5.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%2Fi%2Fa3xqecep1hh33z1c1qb5.png" alt="Asset 11@"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
display:flex; /* or inline flex */
}

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

&lt;/div&gt;



&lt;p&gt;Note: CSS columns have no effect on a flex container.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Flex Direction
&lt;/h4&gt;

&lt;p&gt;The default direction of flex is a row&lt;/p&gt;
&lt;/blockquote&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%2Fi%2Frghukz0bq4vqf91z7gza.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%2Fi%2Frghukz0bq4vqf91z7gza.png" alt="Row"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;change direction by &lt;code&gt;flex-direction:column&lt;/code&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%2Fi%2Fja034t5d01d13hj86l8m.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%2Fi%2Fja034t5d01d13hj86l8m.png" alt="Asset 3"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
 flex-direction: row | row-reverse | column | column-reverse;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Flex-Wrap
&lt;/h4&gt;
&lt;/blockquote&gt;

&lt;p&gt;Flex items try to fix in one line but you can change that behavior.&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%2Fi%2Fvdjs1dxc3dy52d3si1ci.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%2Fi%2Fvdjs1dxc3dy52d3si1ci.png" alt="FlexWrap"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
flex-wrap: nowrap | wrap | wrap-reverse;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nowrap&lt;/code&gt;(default): All items will be on one line.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wrap&lt;/code&gt;: Items will go on the next line from top to bottom.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wrap-reverse&lt;/code&gt;: Items will go on the next line from bottom to top.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Justify Content
&lt;/h4&gt;
&lt;/blockquote&gt;

&lt;p&gt;This property helps us to align objects along the main axis. It gives more control over the alignment when items overflow the line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;flex-start&lt;/code&gt;(default): Items are towards the start of the container.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flex-end&lt;/code&gt;: Items are towards the end of the container.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;center&lt;/code&gt;: Items are center along the line.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;space-between&lt;/code&gt;: Items are evenly distributed. The first item will at the start and the last item at the end.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;space-around&lt;/code&gt;: Items get equal face around them. Note that when you look at it space is not equal. The first item will have 1unit space from the container but from the next item, it will be 2units. 1unit from itself and 1unit of the next item.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;space-evenly&lt;/code&gt;: Items are distributed in such a way that they equal space for each.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Align-Items
&lt;/h4&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the version of &lt;code&gt;justify-content&lt;/code&gt; along with the cross axis;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-items: stretch | flex-start | flex-end | center | baseline
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;stretch&lt;/code&gt;(default): stretch to fill the container still it follows min-width/max-width rule.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flex-start&lt;/code&gt;: Items are placed at the start of the cross-axis.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flex-end&lt;/code&gt;: Items are placed at the end of the cross-axis.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;center&lt;/code&gt;: Items are centered in the cross-axis.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;baseline&lt;/code&gt;: Items are aligned such as their baselines align.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now here is one question that might pop in your head, like mine did when I first learn about it. Which is better to use CSS Grid or Flexbox?&lt;/p&gt;

&lt;p&gt;It depends if you have a small design to implement, let's say you just need to align an element in a viewport, then you can go with the flexbox. You can go with CSS Grid whenever you have complex layouts, overlapping elements to handle, and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a resource from scotch that will help you to visualize it better.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;We learned about the flexbox use cases, where and how to use them effectively. I personally prefer CSS grid and flexbox. CSS grid for outer layout and for inside flexbox that’s it!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can check the &lt;a href="https://rick-and-morty-api-kohl.vercel.app/" rel="noopener noreferrer"&gt;project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank You for reading. Signing off 🙌&lt;/p&gt;

&lt;h4&gt;
  
  
  Feel free to reach out 👇
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;GitHub: &lt;a href="https://github.com/Push9828" rel="noopener noreferrer"&gt;https://github.com/Push9828&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/PushkarThakur28" rel="noopener noreferrer"&gt;https://twitter.com/PushkarThakur28&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="http://www.linkedin.com/in/pushkarthakur28" rel="noopener noreferrer"&gt;www.linkedin.com/in/pushkarthakur28&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
