<?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: Zaiste</title>
    <description>The latest articles on DEV Community by Zaiste (@zaiste).</description>
    <link>https://dev.to/zaiste</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%2F150061%2Fc0bb72bb-bfb2-45c3-9abc-f8947e6dc1bd.jpeg</url>
      <title>DEV Community: Zaiste</title>
      <link>https://dev.to/zaiste</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zaiste"/>
    <language>en</language>
    <item>
      <title>Livestream: Building E-Commerce Apps with Flutter &amp; GraphQL</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Sun, 04 Jul 2021 18:19:57 +0000</pubDate>
      <link>https://dev.to/zaiste/livestream-building-e-commerce-apps-with-flutter-graphql-1ao3</link>
      <guid>https://dev.to/zaiste/livestream-building-e-commerce-apps-with-flutter-graphql-1ao3</guid>
      <description>&lt;p&gt;I'll be doing a live stream this week about building mobile apps with &lt;a href="https://flutter.dev"&gt;Flutter&lt;/a&gt; and GraphQL. My plan is to create a simple e-commerce app. For the backend I'll use the &lt;a href="https://saleor.io"&gt;Saleor API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If this sounds interesting and/or you're building (or planning to build) something similar, let me know your questions. I'll happily consider them during the coding! This can be anything related to Flutter, GraphQL or e-commerce.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://zaiste.net/interviews/flutter-graphql-ecommerce-1/"&gt;Register to the event&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The stream will happen on &lt;a href="https://www.youtube.com/c/zaisteprogramming"&gt;my YouTube channel&lt;/a&gt; - subscribe and click the notificaiton bell.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>graphql</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Modern React.js Setup for GraphQL (using Vite &amp; urql)</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Tue, 29 Sep 2020 13:39:40 +0000</pubDate>
      <link>https://dev.to/zaiste/modern-react-js-setup-for-graphql-using-vite-urql-abg</link>
      <guid>https://dev.to/zaiste/modern-react-js-setup-for-graphql-using-vite-urql-abg</guid>
      <description>&lt;h3&gt;
  
  
  In this tutorial, we will build a React.js application that interacts with a GraphQL endpoint. This method of project setup is modern and lightweight: it uses Hooks, ES Modules and has a small amount of dependencies. We will use &lt;a href="https://github.com/vitejs/vite" rel="noopener noreferrer"&gt;Vite&lt;/a&gt; to create the project structure, &lt;a href="https://pnpm.js.org/" rel="noopener noreferrer"&gt;pnpm&lt;/a&gt; to manage the dependencies, &lt;a href="https://formidable.com/open-source/urql/" rel="noopener noreferrer"&gt;urql&lt;/a&gt; for GraphQL, and finally &lt;a href="https://www.onegraph.com/" rel="noopener noreferrer"&gt;OneGraph&lt;/a&gt; as the GraphQL gateway to various APIs. Our goal is to create an application for listing GitHub repositories of a specific user.
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Install &lt;code&gt;pnpm&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s start with &lt;code&gt;pnpm&lt;/code&gt;, a package manager for JavaScript that is faster and more efficient than &lt;code&gt;npm&lt;/code&gt; or &lt;code&gt;yarn&lt;/code&gt;. &lt;code&gt;pnpm&lt;/code&gt; uses a content-addressable filesystem to store your project dependencies. This way files inside &lt;code&gt;node_modules&lt;/code&gt; are linked from a single place on your disk. Thus, you install each dependency only once and this dependency occupies the space on your disk only once. In other words, libraries are not copied over for each new project. This way, on top of being faster than alternatives, &lt;code&gt;pnpm&lt;/code&gt; provides huge disk space gains.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pnpm&lt;/code&gt; comes with two command-line tools: &lt;code&gt;pnpm&lt;/code&gt; for installing dependencies and &lt;code&gt;pnpx&lt;/code&gt; for invoking commands (a &lt;code&gt;npx&lt;/code&gt; equivalent).&lt;/p&gt;

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

&lt;p&gt;Let’s use Vite to create the project structure for our React.js project. We need to initialize the project using the &lt;code&gt;vite-app&lt;/code&gt; generator with the React as the template. The template must be set explicitly using the &lt;code&gt;--template&lt;/code&gt; parameter with &lt;code&gt;react&lt;/code&gt; as its value. Finally, &lt;code&gt;gh-explorer&lt;/code&gt; is a custom name we are giving to this project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pnpm init vite-app gh-explorer --template react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vite is a build tool for web projects. It serves the code in development using ECMAScript Module imports. In production, vite bundles the code using Rollup. Vite is a lightweight solution that can be &lt;strong&gt;100-150x times&lt;/strong&gt; faster than alternatives such as Webpack or Parcel. This enormous speed gain is possible thanks to &lt;a href="https://github.com/evanw/esbuild" rel="noopener noreferrer"&gt;esbuild&lt;/a&gt;, a new TypeScript/JavaScript bundler written using the Go programming language.&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%2Fuser-images.githubusercontent.com%2F200613%2F93084500-664aeb00-f694-11ea-8cff-372f5c0057b4.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%2Fuser-images.githubusercontent.com%2F200613%2F93084500-664aeb00-f694-11ea-8cff-372f5c0057b4.png" alt="esbuild benchmark"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go inside the &lt;code&gt;gh-explorer&lt;/code&gt; directory and install the necessary dependencies using the &lt;code&gt;pnpm install&lt;/code&gt; command. Then, start the development server with &lt;code&gt;pnpm dev&lt;/code&gt; and head to the &lt;code&gt;localhost:5000&lt;/code&gt; in your browser. You should see a React.js logo along with a counter and a button.&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%2Fuser-images.githubusercontent.com%2F200613%2F93084551-85497d00-f694-11ea-9285-ba2716582f7a.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%2Fuser-images.githubusercontent.com%2F200613%2F93084551-85497d00-f694-11ea-9285-ba2716582f7a.png" alt="A React.js project generated by Vite"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate with OneGraph
&lt;/h2&gt;

&lt;p&gt;When interacting with external APIs, we need to learn the specifics for each new API we are dealing with. This is especially visible at the level of authentication. The methods of authentication are slightly different between one API and another. Even though those APIs are provided either as REST or GraphQL endpoints, it takes time and often much effort to learn how to use them. Luckly, there is OneGraph. The project provides a layer of unification for various GraphQL APIs. Using OneGraph, we can just access one endpoint and gain access to various GraphQL APIs at once. Think, a catalog of APIs. This simplifies and speeds up the development. We will use OneGraph to interact with the GitHub API.&lt;/p&gt;

&lt;p&gt;Let’s create an application in OneGraph:&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%2Fuser-images.githubusercontent.com%2F200613%2F93085161-70211e00-f695-11ea-9c94-9306b2f358ca.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%2Fuser-images.githubusercontent.com%2F200613%2F93085161-70211e00-f695-11ea-9c94-9306b2f358ca.gif" alt="Creating an application in OneGraph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we can use OneGraph's Explorer to test our GraphQL queries for GitHub before we integrate them with our React.js application. On the left side of the Explorer I have a list of all available APIs. It goes from Airtable, Box to Shopify, Stripe, Zendesk and much more. This catalog is quite impressive on its own.&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%2Fuser-images.githubusercontent.com%2F200613%2F93085373-c5f5c600-f695-11ea-85be-44561245af2a.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%2Fuser-images.githubusercontent.com%2F200613%2F93085373-c5f5c600-f695-11ea-85be-44561245af2a.png" alt="OneGraph's Explorer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Construct the GraphQL Query
&lt;/h2&gt;

&lt;p&gt;Our goal is to list the repositories of a specific user. I start by selecting the GitHub API. Then, I select the&lt;code&gt;user&lt;/code&gt; branch. I enter the handle of a specific user, e.g. &lt;code&gt;zaiste&lt;/code&gt; - in this case, it’s my own username. I go further down the GitHub API tree by selecting the &lt;code&gt;repositories&lt;/code&gt; branch. I want to list only the public repositories that are not forks and ordered by the number of stars. For each repository, I want to return its &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt; and the number of stars.&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%2Fuser-images.githubusercontent.com%2F200613%2F93086730-da3ac280-f697-11ea-8079-2ea256c9e36a.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%2Fuser-images.githubusercontent.com%2F200613%2F93086730-da3ac280-f697-11ea-8079-2ea256c9e36a.gif" alt="OneGraph Explorer for GitHub in action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just by clicking the fields in the OneGraph Explorer I end up with the following GraphQL query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GitHubRepositories&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;gitHub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"zaiste"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;orderBy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;STARGAZERS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;privacy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PUBLIC&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;isFork&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;affiliations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OWNER&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;nodes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="n"&gt;stargazers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="n"&gt;orderBy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;STARRED_AT&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="n"&gt;direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="n"&gt;totalCount&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Integrate with urql
&lt;/h2&gt;

&lt;p&gt;We can now execute this query from our React.js application. We will use urql, a versatile GraphQL client for React.js, Preact and Svelte. The project is lightweight and highly customizable compared to alternatives such as Apollo or Relay. Its API is simple and the library aims to be easy to use. We need to add &lt;code&gt;urql&lt;/code&gt; along with the &lt;code&gt;graphql&lt;/code&gt; as dependencies for our project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pnpm add urql graphql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;urql&lt;/code&gt; provides the &lt;code&gt;useQuery&lt;/code&gt; hook. This function takes the GraphQL query as input, and returns the data along with errors and the fetching status as the result. We will name our component &lt;code&gt;RepositoryList&lt;/code&gt;. You can use the regular &lt;code&gt;.jsx&lt;/code&gt; extension, or &lt;code&gt;.tsx&lt;/code&gt; if you plan to integrate with TypeScript - it will work out-of-the-box with Vite. There is no need for additional TypeScript configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RepositoryList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useQuery&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fetching&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fetching&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Errored!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;repos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gitHub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;repos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&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;small&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;(&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stargazers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;totalCount&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;small&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;))&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;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, in &lt;code&gt;main.jsx&lt;/code&gt; let’s configure our GraphQL client. We need the &lt;code&gt;Provider&lt;/code&gt; component along with the &lt;code&gt;createClient&lt;/code&gt; function from &lt;code&gt;urql&lt;/code&gt;, and an instance of &lt;code&gt;OneGraphAuth&lt;/code&gt;. For the latter, we need another dependency, i.e. &lt;code&gt;onegraph-auth&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;pnpm add onegraph-auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s create an instance of &lt;code&gt;OneGraphAuth&lt;/code&gt; with the &lt;code&gt;appId&lt;/code&gt; of the application we created using the OneGraph dashboard. Then, we create a GraphQL client with the OneGraph endpoint as the &lt;code&gt;url&lt;/code&gt; parameter. Finally, we nest the &lt;code&gt;&amp;lt;App/&amp;gt;&lt;/code&gt; component inside the &lt;code&gt;&amp;lt;Provider/&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&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;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-dom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;urql&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OneGraphAuth&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;onegraph-auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./index.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;appId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;Your APP_ID from OneGraph goes here&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OneGraphAuth&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;appId&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://serve.onegraph.com/dynamic?app_id=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;fetchOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;authHeaders&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&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;Provider&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;client&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;App&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;Provider&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;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&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="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Authenticate with OneGraph
&lt;/h2&gt;

&lt;p&gt;We are almost finished. The last step is to authenticate the user against the OneGraph endpoint. It’s a unified approach for any API from the OneGraph catalog. We will use the &lt;code&gt;.login&lt;/code&gt; method from the &lt;code&gt;onegraph-auth&lt;/code&gt; with &lt;code&gt;github&lt;/code&gt; as the value. Once the user logs in, we will adjust the state accordingly by displaying the &lt;code&gt;&amp;lt;RepositoryList/&amp;gt;&lt;/code&gt; component.&lt;br&gt;
&lt;/p&gt;

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

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./main&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RepositoryList&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./RepositoryList&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsLoggedIn&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;github&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;github&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nf"&gt;setIsLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App-header"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;GitHub Projects via OneGraph&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RepositoryList&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;login&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;gt;&lt;/span&gt;
              Login with YouTube
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;That’s all. Here’s the final result. You may need to adjust the stylesheets for the same visual effect.&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%2Fuser-images.githubusercontent.com%2F200613%2F93087084-5d5c1880-f698-11ea-90d2-46629c473450.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%2Fuser-images.githubusercontent.com%2F200613%2F93087084-5d5c1880-f698-11ea-90d2-46629c473450.png" alt="Final Result: List of GitHub repositories"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We created a React.js application using &lt;strong&gt;Hooks&lt;/strong&gt;. The project has a &lt;strong&gt;minimal set of dependencies&lt;/strong&gt;. It uses the modern &lt;strong&gt;ECMASCript Modules&lt;/strong&gt; approach. It is &lt;strong&gt;efficient in disk space&lt;/strong&gt; as it uses pnpm as the package manager. The JavaScript/TypeScript transpilation is &lt;strong&gt;100-150x faster&lt;/strong&gt; than Webpack or Parcel. We use a simple and versatile GraphQL client called &lt;strong&gt;urql&lt;/strong&gt;. Finally, we access the GitHub API via &lt;strong&gt;OneGraph&lt;/strong&gt;, a meta API that provides an impressive catalog of GraphQL APIs with the unified access method. The end result is lightweight and modern.&lt;/p&gt;

&lt;p&gt;I hope you will use some of those elements in your future React.js applications. If you liked the article, &lt;a href="https://twitter.com/zaiste" rel="noopener noreferrer"&gt;follow me on Twitter&lt;/a&gt; for more.&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;h2&gt;
  
  
  Video Tutorial
&lt;/h2&gt;

&lt;p&gt;If you prefer watching programming tutorials rather than reading them, check this video on YouTube where I code this application step-by-step.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/x4Rc3RytAls"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you like it, &lt;a href="https://www.youtube.com/channel/UCzgkOWKcwy0uhYilE6bd1Lg" rel="noopener noreferrer"&gt;subscribe to my channel&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>My Favorite Privacy Tools in 2020: Be Safer on the Internet!</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Sun, 16 Aug 2020 20:27:05 +0000</pubDate>
      <link>https://dev.to/zaiste/my-favorite-privacy-tools-in-2020-be-safer-on-the-internet-4dik</link>
      <guid>https://dev.to/zaiste/my-favorite-privacy-tools-in-2020-be-safer-on-the-internet-4dik</guid>
      <description>&lt;p&gt;This is a list of tools I use to increase my privacy on the Internet. I'm not a security expert. My goal is to have a good enough protection. Feel free to suggest any additions and improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Firefox
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bgV3tzc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343120-ed616080-e00d-11ea-9451-f2c69ada5246.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bgV3tzc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343120-ed616080-e00d-11ea-9451-f2c69ada5246.jpg" alt="firefox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mozilla.org/en-US/exp/firefox/"&gt;Firefox&lt;/a&gt; probably doesn't need an introduction. It is an open-source project. It's run by Mozilla - a non-profit organization. Anyone can go to the &lt;a href="https://hg.mozilla.org/"&gt;Firefox repository&lt;/a&gt; to take a look at the code and see how it works.&lt;/p&gt;

&lt;p&gt;Firefox doesn't gather your personal data to serve you ads as Chrome. While Google seems careful and to an extend trustworthy with handling people's personal data, you don't seem to have much control how your profile is built and used.&lt;/p&gt;

&lt;p&gt;The browser is constantly being improved. It seems slightly heavier than Chrome or Safari on my computer, but that's a minor issue compared to all the advantages. I use the &lt;a href="https://www.mozilla.org/en-US/firefox/developer/"&gt;Developer Edition&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Little Snitch
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MjGxKDqd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343121-edf9f700-e00d-11ea-91d7-a2a876111ca1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MjGxKDqd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343121-edf9f700-e00d-11ea-91d7-a2a876111ca1.jpg" alt="Little Snitch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.obdev.at/products/littlesnitch/"&gt;Little Snitch&lt;/a&gt; is a MacOS application that  monitors connections and lets you control inbound and outbound traffic from your computer. It visualizes these connections and shows where applications connect. This way you have information about both familiar and unfamiliar network actions that applications are trying to perform.&lt;/p&gt;

&lt;h2&gt;
  
  
  PiHole &amp;amp; AdGuard
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uZ_mVMln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343124-ef2b2400-e00d-11ea-8f26-f4dcbdf189d6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uZ_mVMln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343124-ef2b2400-e00d-11ea-8f26-f4dcbdf189d6.jpg" alt="Pi Hole"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2fGYayDG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343113-e9cdd980-e00d-11ea-8d17-642c01565237.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2fGYayDG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343113-e9cdd980-e00d-11ea-8d17-642c01565237.jpg" alt="AdGuard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pi-hole.net/"&gt;PiHole&lt;/a&gt; &amp;amp; &lt;a href="https://adguard.com/"&gt;AdGuard&lt;/a&gt; are ad blockers. PiHole is open-source while AdGuard is a paid offering. I use one at home and the other one at the office. AdGuard is slightly easier to setup and use. Both work network-wide, but AdGuard also provides standalone applications and browser plugins to protect from ads when being outside of private networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nibspace
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ES46bDUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343122-ee928d80-e00d-11ea-950f-3514adfca5fa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ES46bDUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343122-ee928d80-e00d-11ea-950f-3514adfca5fa.jpg" alt="Nibspace"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nibspace.com/"&gt;Nibspace&lt;/a&gt; is an alternative to Google Analytics. It provides basic information about the visitors of my websites. It doesn't use cookies and it has a small footprint (~ 1kb) while being affordable ($1/mo per domain). It's not open-source. There are few other, notable competitors such as &lt;a href="https://usefathom.com/"&gt;Fathom&lt;/a&gt;, &lt;a href="https://simpleanalytics.com/"&gt;Simple Analytics&lt;/a&gt; and &lt;a href="https://plausible.io/"&gt;Plausible&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bitwarden
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--368LsI4j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343117-ec303380-e00d-11ea-828d-c0bf960154a2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--368LsI4j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343117-ec303380-e00d-11ea-828d-c0bf960154a2.png" alt="Bitwarden"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bitwarden.com/"&gt;Bitwarden&lt;/a&gt; is an open-source password manager. I used to use 1Password, but I wanted something more affordable yet with similar features and Bitwarden fits the bill perfectly.&lt;/p&gt;

&lt;h2&gt;
  
  
  NordVPN
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Do7e2CG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343123-ef2b2400-e00d-11ea-8026-de472ec96bc6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Do7e2CG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343123-ef2b2400-e00d-11ea-8026-de472ec96bc6.jpg" alt="Nord VPN"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nordvpn.com/"&gt;NordVPN&lt;/a&gt; is a personal virtual private network service provider. Their marketing seems aggressive, so I was a bit skeptical at the beginning, but then I decided to give it a try. Overall, NordVPN is one of the most polished and reliable VPNs I've used so far.&lt;/p&gt;

&lt;p&gt;I also like that they show some innovation efforts, namely their NordLynx technology that is built around WireGuard - this relatively new VPN tunneling protocol&lt;/p&gt;

&lt;p&gt;Last year &lt;a href="https://news.ycombinator.com/item?id=21312609"&gt;NordVPN was hacked&lt;/a&gt;, but they handled the whole situation pretty well in my view.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fastmail
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1X9pTgZr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343118-ecc8ca00-e00d-11ea-938b-7e9f884e8a6d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1X9pTgZr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/200613/90343118-ecc8ca00-e00d-11ea-938b-7e9f884e8a6d.jpg" alt="Fastmail"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.fastmail.com/"&gt;Fastmail&lt;/a&gt; is a paid e-mail service that focuses on privacy and doesn't display ads. It is a simple service to manage e-mails, calendars and contacts. It costs $5/mo. It is also fast. This is partly related to their work on a more reliable, faster IMAP alternative, called &lt;a href="https://jmap.io/"&gt;JMAP&lt;/a&gt; - so it goes beyond just a snappy UI.&lt;/p&gt;




&lt;p&gt;Have I missed an interesting tool? Let me know &lt;a href="https://twitter.com/zaiste"&gt;on Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>security</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>15 Command-Line Tools to Make You Better at Shell &amp; CLI</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Wed, 05 Aug 2020 09:41:50 +0000</pubDate>
      <link>https://dev.to/zaiste/15-command-line-tools-to-make-you-better-at-shell-cli-35n6</link>
      <guid>https://dev.to/zaiste/15-command-line-tools-to-make-you-better-at-shell-cli-35n6</guid>
      <description>&lt;p&gt;Shell is the &lt;strong&gt;essential tool&lt;/strong&gt; for every programmer. The more familiar you become with the available tools, the more efficient you can be with using your computer. Here's a list of command-line tools that aim to provide modern, often much faster, alternatives to the existing shell commands. These tools will boost your skill at shell.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;bat&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;bat&lt;/code&gt; is a &lt;code&gt;cat&lt;/code&gt; clone with syntax highlighting and Git integration that works on Windows, MacOS and Linux. It provides syntax highlighting for many file extensions by default.&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%2Fk2q75cfqe8cao9o2p6qq.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%2Fk2q75cfqe8cao9o2p6qq.png" alt="bat"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sharkdp/bat" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;exa&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;exa&lt;/code&gt; is a modern replacement for &lt;code&gt;ls&lt;/code&gt;, the default command-line program in Unix/Linux for listing directory contents. exa supports icons with the &lt;code&gt;--icons&lt;/code&gt; flag.&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%2Fvo0khex1f140d0mio6r4.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%2Fvo0khex1f140d0mio6r4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ogham/exa" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;fd&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;fd&lt;/code&gt; is a fast and user-friendly alternative to &lt;code&gt;find&lt;/code&gt;, the built-in command-line program in Unix/Linux for walking a file hierarchy. &lt;code&gt;fd&lt;/code&gt; provides opinionated defaults for the most common use cases. To find a specific file by name, you write &lt;code&gt;fd PATTERN&lt;/code&gt; instead of &lt;code&gt;find -iname ‘*PATTERN*’&lt;/code&gt;. &lt;code&gt;fd&lt;/code&gt; is also extremely fast and it comes with a ton of options like ignoring hidden directories, files and patterns from &lt;code&gt;.gitignore&lt;/code&gt; by default.&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%2Fibk896y0i4910axemtqy.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%2Fibk896y0i4910axemtqy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sharkdp/fd" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;procs&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;procs&lt;/code&gt; is a modern replacement for &lt;code&gt;ps&lt;/code&gt;, the default command-line program in Unix/Linux for getting information about processes. It provides convenient, human-readable (and colored) output format by default.&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%2F8mhfxfrquad3od0wunne.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%2F8mhfxfrquad3od0wunne.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dalance/procs" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;sd&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;sd&lt;/code&gt; is an intuitive find &amp;amp; replace command-line tool, it is an alternative to &lt;code&gt;sed&lt;/code&gt;, the built-in command-line program in Unix/Linux for parsing and transforming text. &lt;code&gt;sd&lt;/code&gt; has simpler syntax for replacing all occurrences and it uses the convenient regex syntax that you already know from JavaScript and Python. &lt;code&gt;sd&lt;/code&gt; is also 2x-11x faster than sed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sed&lt;/code&gt; is a programmable text editor, with search and replace being a common use case. In that light, sd is more like &lt;code&gt;tr&lt;/code&gt;, but on steroids. (thanks /u/oleid for the suggestion).&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%2F357o78kmw1eil7j8ghvr.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%2F357o78kmw1eil7j8ghvr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/chmln/sd" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;dust&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;dust&lt;/code&gt; is a more intuitive version of &lt;code&gt;du&lt;/code&gt;, the built-in command-line program in Unix/Linux for displaying disk usage statistics. By default &lt;code&gt;dust&lt;/code&gt; sorts the directories by size.&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%2Fpe5swoggez4gj6xcx68l.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%2Fpe5swoggez4gj6xcx68l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/bootandy/dust" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;starship&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;The minimal, blazing-fast, and infinitely customizable prompt for any shell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://starship.rs/guide/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;ripgrep&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;ripgrep&lt;/code&gt; is an extremely fast alternative to &lt;code&gt;grep&lt;/code&gt;, the built-in command-line program in Unix/Linux for searching files by pattern. &lt;code&gt;ripgrep&lt;/code&gt; is a line-oriented search tool that recursively searches your current directory for a regex pattern. By default, &lt;code&gt;ripgrep&lt;/code&gt; respects &lt;code&gt;.gitignore&lt;/code&gt; and automatically skips hidden files, directories and binary files.&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%2F0p65wdk6exwvly3kgtp0.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%2Fi%2F0p65wdk6exwvly3kgtp0.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/BurntSushi/ripgrep" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;tokei&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;tokei&lt;/code&gt; is a program that displays statistics about your code. It shows the number of files, total lines within those files and code, comments, and blanks grouped by language.&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%2F7jh31eo1kf7c54hd1nkb.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%2F7jh31eo1kf7c54hd1nkb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/XAMPPRocky/tokei" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;hyperfine&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;hyperfine&lt;/code&gt; is a command-line benchmarking tool. Among many features, it provides statistical analysis across multiple runs, support for arbitrary shell commands, constant feedback about the benchmark progress and current estimates and more.&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%2Flq87fs5nywkr9fx9yulx.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%2Fi%2Flq87fs5nywkr9fx9yulx.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sharkdp/hyperfine" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;ytop&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;ytop&lt;/code&gt; is an alternative to &lt;code&gt;top&lt;/code&gt;, the built-in command-line program in Unix/Linux for displaying information about processes.&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%2Fkgszbiklhijcxi5q71wi.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%2Fi%2Fkgszbiklhijcxi5q71wi.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cjbassi/ytop" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;tealdeer&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;tealdeer&lt;/code&gt; is a very fast implementation of &lt;code&gt;tldr&lt;/code&gt;, a command-line program for displaying simplified, example based and community-driven man pages.&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%2Fd01d9qxds4z5flac4yyk.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%2Fi%2Fd01d9qxds4z5flac4yyk.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dbrgn/tealdeer" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;bandwhich&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;bandwhich&lt;/code&gt; is a CLI utility for displaying current network utilization by process, connection and remote IP or hostname.&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%2Fmojjzznm0r2922b3157h.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%2Fi%2Fmojjzznm0r2922b3157h.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub&lt;/p&gt;

&lt;h1&gt;
  
  
  grex
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;grex&lt;/code&gt; is a command-line tool and library for generating regular expressions from user-provided test cases.&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%2F2xk08h8rcyj7amh024iu.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%2Fi%2F2xk08h8rcyj7amh024iu.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pemistahl/grex" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;zoxide&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;zoxide&lt;/code&gt; is a blazing fast autojumper, intended to completely replace the &lt;code&gt;cd&lt;/code&gt; command. It allows you to change directories without typing out the entire path name.&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%2Fotxcy79ookz4greormoi.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%2Fi%2Fotxcy79ookz4greormoi.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ajeetdsouza/zoxide" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Bonus: &lt;code&gt;nushell&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;nushell&lt;/code&gt; is a new type of shell, written in Rust. Its goal is to create a modern shell alternative that's still based on the Unix philosophy, but adapted to the current era. It supports piping and filtering in a way similar to awk and sed with a column view so that you can combine operations like in SQL. (thanks /u/matu3ba for the suggestion).&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%2Fg50chlb147posveueewa.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%2Fi%2Fg50chlb147posveueewa.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nushell/nushell" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have I missed an interesting command-line tool? Let me know &lt;a href="https://twitter.com/zaiste" rel="noopener noreferrer"&gt;on Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>linux</category>
      <category>bash</category>
    </item>
    <item>
      <title>Full-Stack TypeScript using Node.js, Vue.js 3 &amp; PostgreSQL - Introduction</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Thu, 04 Jun 2020 21:27:31 +0000</pubDate>
      <link>https://dev.to/zaiste/full-stack-typescript-using-node-js-vue-js-3-postgresql-introduction-189a</link>
      <guid>https://dev.to/zaiste/full-stack-typescript-using-node-js-vue-js-3-postgresql-introduction-189a</guid>
      <description>&lt;h3&gt;
  
  
  In this tutorial series, we will be writing a fully featured &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt; application from scratch using Node.js &amp;amp; the upcoming Vue.js 3. The goal is to cover the process of building a &lt;strong&gt;full-stack TypeScript&lt;/strong&gt; application in a comprehensive and accessible way so that you could see it &lt;strong&gt;from A to Z&lt;/strong&gt; and step-by-step.
&lt;/h3&gt;

&lt;p&gt;This tutorial will cover not only the front-end part, but also the back-end part and everything in-between: from setting up the database through designing the database schema, exposing an API using both REST &amp;amp; GraphQL endpoints, till the application deployment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Check the &lt;a href="https://taski.app"&gt;Live Demo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This series will teach you how to connect different layers to create a fully functioning web application. This approach aims to give you the big picture of building web applications so that you have a basic understanding of all the elements and techniques needed for creating your own applications from scratch, or rather from A to Z.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;In this series, we will build yet another task management application. I decided to showcase creating another task manager because the notions of such application are simple and well understood. You already know what a task is, you know that you can group or filter them, or that you can mark tasks as done. You probably used a task manager yourself at some point. As a result, instead of spending time on explaining the business features and their outcomes, we can be practical and focus on building the actual app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technology Stack
&lt;/h2&gt;

&lt;p&gt;On the back-end we will be using &lt;a href="https://nodejs.org/en/"&gt;Node.js&lt;/a&gt; 14.x+, while on the front-end we will be using a UI framework called Vue.js, specifically the upcoming (currently in beta) &lt;a href="https://github.com/vuejs/vue-next"&gt;Vue.js 3&lt;/a&gt; that introduces the &lt;a href="https://composition-api.vuejs.org/"&gt;Composition API&lt;/a&gt; (something similar to Hooks in React.js). For the database layer, you will use &lt;a href="https://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; - probably the best database out there. ;) I will show you how to design the database schema, how to create tables and how to make relations between them. We will also see how to use PostgreSQL as a NoSQL solution and how it compares to databases such as MongoDB et al. For the UI we will do something different. Instead of writing CSS by hand we will use &lt;a href="https://tailwindcss.com/"&gt;Tailwind CSS&lt;/a&gt; that provides a set of predefined building blocks that we can combine directly in HTML pages to quickly create coherent UIs. Finally, &lt;a href="https://kretes.dev/"&gt;Kretes&lt;/a&gt; will put all those tools together in a ready to use solution (it's like a boilerplate on steroids) so that you can focus on building the actual application and its business logic, instead of spending time manually configuring and putting things like TypeScript, Node.js, Vue.js or PostgreSQL together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future
&lt;/h2&gt;

&lt;p&gt;This tutorial aims to cover modern approaches in web development. At some pointwe may switch certain things in our stack. For example, we may try to replace Node.js with &lt;a href="https://deno.land/"&gt;Deno&lt;/a&gt; or Vue.js with the &lt;a href="https://github.com/ryansolid/solid"&gt;Solid.js&lt;/a&gt; framework, etc. The idea is to track the current trends &amp;amp; tendencies in web development instead of using older, already established ways of creating web applications, and also to give you an early example how to use these modern solutions to build full-stack TypeScript applications. In other words, our goal here is to explore new or improved ways of building web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Design the application UI using Tailwind CSS&lt;/li&gt;
&lt;li&gt;Make the application interactive using Vue.js 3&lt;/li&gt;
&lt;li&gt;Implement the backend&lt;/li&gt;
&lt;li&gt;Define and expose a REST API&lt;/li&gt;
&lt;li&gt;Design a basic database schema&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Stay tuned for the next part in the series!&lt;/strong&gt;
&lt;/h3&gt;




&lt;h3&gt;
  
  
  Video Tutorial
&lt;/h3&gt;

&lt;p&gt;If you prefer watching programming tutorials rather than reading them, check this video series &lt;a href="https://www.youtube.com/watch?v=rLAElFkRrWI&amp;amp;list=PLhXZp00uXBk5hnHEIAFl74mZyLrVKKJAD"&gt;on YouTube&lt;/a&gt; where I code this application step-by-step.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rLAElFkRrWI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;If you like this TypeScript series, check &lt;a href="https://www.youtube.com/user/ohzaiste"&gt;my other video tutorials&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I'm Live Streaming How To Build a Mobile App for Dev.to in Flutter with REST &amp; GraphQL</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Sun, 26 Jan 2020 15:09:31 +0000</pubDate>
      <link>https://dev.to/zaiste/i-m-live-streaming-how-to-build-a-mobile-app-for-dev-to-in-flutter-with-rest-graphql-3jmm</link>
      <guid>https://dev.to/zaiste/i-m-live-streaming-how-to-build-a-mobile-app-for-dev-to-in-flutter-with-rest-graphql-3jmm</guid>
      <description>&lt;p&gt;In this very first live stream session, I'll build yet another mobile app for the &lt;strong&gt;Dev.to community&lt;/strong&gt;. The application will be developed using the &lt;a href="https://flutter.dev/"&gt;Flutter framework&lt;/a&gt;. I'll integrate with Dev.to's REST API followed by the integration with the GraphQL endpoint provided by &lt;a href="https://www.onegraph.com/"&gt;OneGraph&lt;/a&gt;. My goal is to have a simple article browsing by the end of it.&lt;/p&gt;

&lt;p&gt;The live stream will start at 18:00 CET / 12:00 EST on Sunday, Jan 26th. Here's the link:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QH0FnlparOQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>flutter</category>
      <category>tutorial</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How to Quickly Build a REST API in Node.js with TypeScript (for Absolute Beginners) - PART 1 of 4</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Sun, 29 Dec 2019 17:37:21 +0000</pubDate>
      <link>https://dev.to/zaiste/how-to-quickly-build-a-rest-api-in-node-js-with-typescript-for-absolute-beginners-part-1-of-4-21de</link>
      <guid>https://dev.to/zaiste/how-to-quickly-build-a-rest-api-in-node-js-with-typescript-for-absolute-beginners-part-1-of-4-21de</guid>
      <description>&lt;p&gt;Let's build a simple a REST API in Node.js using &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;. This series will be split into &lt;strong&gt;four parts&lt;/strong&gt; as there is a lot to discuss. It is also aimed for absolute beginners or people just starting with programming. At the same time I will be mentioning few some advanced topics so that even if you know how to build a REST API, you will hopefully still gain something from reading this tutorial.&lt;/p&gt;

&lt;p&gt;If you prefer to watch me coding this application instead of reading the article, check this video:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/AqanhZQJfrw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Also, if you liked it, consider subscribing to &lt;a href="https://www.youtube.com/zaiste"&gt;my YouTube channel&lt;/a&gt; for more.&lt;/p&gt;




&lt;p&gt;In this series I will be using &lt;a href="https://github.com/huncwotjs/huncwot"&gt;Huncwot&lt;/a&gt;, which is a tool to quickly build web applications. It is an integrated solution that covers both frontend, backend and everything in between.&lt;/p&gt;

&lt;p&gt;Let's start by installing &lt;a href="https://github.com/huncwotjs/huncwot"&gt;Huncwot&lt;/a&gt;. It's better to do it globally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; huncwot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  A bit of theory
&lt;/h2&gt;

&lt;p&gt;Before we jump into the code, let's start with some theory. This won't be a comprehensive introduction. My goal is to explain a few concepts, and then show you some practical examples. I believe this is the best way to quickly gain proper intuition on the subject.&lt;/p&gt;

&lt;h3&gt;
  
  
  APIs
&lt;/h3&gt;

&lt;p&gt;API stands for Application Program Interface. The important bit here is the word /interface/. An interface is this point where we meet to interact with something. For example the screen of our phone is an interface, a user interface (or UI) to be exact. This interface allows us to interact with the device. By touching, pressing and swapping the screen we instruct the phone to do some actions. Those gestures are the middle ground: for humans it would be easier just to think about the action to do, for phones it would be easier to receive the instructions directly as a chain of 0s and 1s; instead we have a compromise, a point in between how to humans can interact with phones - the interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web APIs
&lt;/h3&gt;

&lt;p&gt;There are many types of APIs. In this tutorial we will be discussing a Web API, which are places on the web where we go to interact with something by getting or sending data to it. In other words, a Web API is an interface exposed through an endpoint (an URL) which allows us to interact with some system by exchanging messages. Those messages are requests we send in and responses that we receive. A Web API is a message system, which conceptually is somehow close to object-oriented programming.&lt;/p&gt;

&lt;h3&gt;
  
  
  URLs
&lt;/h3&gt;

&lt;p&gt;Requests instruct Web APIs do something for us. In order to send it we need an address: a URL. URLs have several parts. There is protocol: for Web APIs it's &lt;code&gt;http(s)&lt;/code&gt;. There is a domain which designates a place on the web where this Web API lives. Finally there is a path, which is a location within that domain that describes a specific subset of information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;Let's imagine we want to build a Web API for technical events so that we could ask for the upcoming events in our area, or the best tech conferences which happened in the past. We start by creating necessary abstractions for all entities within that contexts. Those abstractions are called resources. We could start with an &lt;code&gt;Event&lt;/code&gt; resource where each one would have a &lt;code&gt;name&lt;/code&gt; field and a &lt;code&gt;date&lt;/code&gt; field. Later on we could imagine adding other resources such as &lt;code&gt;Attendee&lt;/code&gt;, &lt;code&gt;Organizer&lt;/code&gt;, &lt;code&gt;Speaker&lt;/code&gt; and more.&lt;/p&gt;

&lt;p&gt;We can now expose each resource as the path in the URL of our Web API, e.g. the &lt;code&gt;/event&lt;/code&gt; path for the &lt;code&gt;Event&lt;/code&gt; resource, the &lt;code&gt;/speaker&lt;/code&gt; path for the &lt;code&gt;Speaker&lt;/code&gt; resources and so on. Once the resource is exposed, we can start interacting with it by sending requests and receiving responses. We may, for example, fetch the current state of a particular resource, filter a resource based on a specific criteria, or update a resource because you found a typo in its name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Headers
&lt;/h3&gt;

&lt;p&gt;When sending requests and receiving responses to our Web API we may need to parametrize how this API behaves. This is unrelated to the specific context of that API, whether we are building an API for technical events, to manage a bookstore or to schedule appointments. For example, we may want to change the response format. We communicate that to the API via headers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Handlers
&lt;/h3&gt;

&lt;p&gt;Each path is associated with a function, which describes what should happen once this path visited or this resource requested. We call those functions &lt;strong&gt;handlers&lt;/strong&gt;. A handler receives a request as input and produces a response as output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Routes
&lt;/h3&gt;

&lt;p&gt;A Web API is a mapping between paths (that may describe resources) and handlers. A particular pair of a path and its handler is called &lt;strong&gt;route&lt;/strong&gt;. This is a data-driven approach for defining routes. We use a simple data structure already available in most programming languages, a map to represent the relation between exposed paths and functions being triggered once that path is visited.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Example
&lt;/h2&gt;

&lt;p&gt;Let's finally jump to the code and let's create our project: &lt;code&gt;techevents&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;huncwot new techevents
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's open the project in VS Code. We are only interested in the &lt;code&gt;config/server/routes.ts&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;huncwot&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;OK&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;huncwot/response&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// implicit `return` with a `text/plain` response&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Huncwot&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="c1"&gt;// explicit `return` with a 200 response of `application/json` type&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;OK&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;

    &lt;span class="c1"&gt;// set your own headers&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/headers&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello B&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PASS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// request body is parsed in `params` by default&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/bim&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Hello POST! &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

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



&lt;p&gt;Huncwot generated for us a basic structure for routes. Let's start the server to test it out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;huncwot server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This command will start the server on the port &lt;code&gt;:5544&lt;/code&gt;. We can now send some requests to see how it works. I'll use HTTPie to send requests directly from the command line, but you may also use something like the &lt;a href="https://www.typescriptlang.org/"&gt;Postman API Client&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's send a request to the &lt;code&gt;/hello&lt;/code&gt; path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http :5544/hello
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 13
Content-Type: text/plain
Date: Sun, 29 Dec 2019 16:56:23 GMT

Hello Huncwot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Since the server is running on the &lt;code&gt;localhost&lt;/code&gt; I can skip that part and only specify the port along with the path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http :5544/json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 13
Content-Type: application/json
Date: Sun, 29 Dec 2019 16:56:44 GMT

{
    "a": 1,
    "b": 2
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Huncwot is able to automatically transform a JavaScript object into JSON. Additionally, you may use the response helpers such as &lt;code&gt;OK&lt;/code&gt; to specify an HTTP status code of your choice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http :5544/headers
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 201 Created
Authorization: PASS
Connection: keep-alive
Content-Length: 7
Content-Type: text/plain
Date: Sun, 29 Dec 2019 16:57:11 GMT

Hello B
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Since responses in Huncwot are just objects, you can add the &lt;code&gt;headers&lt;/code&gt; field to the response object with headers of your choice. In this case, the &lt;code&gt;Authorization&lt;/code&gt; header with the value &lt;code&gt;PASS&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In Huncwot, the changes to your routes are automatically reload. There is no need to restart the server nor to install something like &lt;code&gt;nodemon&lt;/code&gt;. It works out of the box. You don't have to worry about this.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;config/server/routes.ts&lt;/code&gt; is a simple JavaScript hash map (or an object to be exact). We can use the &lt;code&gt;Routes&lt;/code&gt; type from Huncwot to further constrain that fact. Each handler receives a request as input (which has the &lt;code&gt;Request&lt;/code&gt; type) and returns a response (which has the &lt;code&gt;Response&lt;/code&gt; type).&lt;/p&gt;




&lt;p&gt;We have now a good understanding of a few concepts related to Web APIs. We built a foundation for a future REST API. We are not yet there as few important elements are still missing. I will cover that in the upcoming articles. Stay tuned!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Programming Languages To Learn In 2020 To Boost Your Career As A Software Developer</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Tue, 17 Dec 2019 17:01:09 +0000</pubDate>
      <link>https://dev.to/zaiste/programming-languages-to-learn-in-2020-to-boost-your-career-as-a-software-developer-56ll</link>
      <guid>https://dev.to/zaiste/programming-languages-to-learn-in-2020-to-boost-your-career-as-a-software-developer-56ll</guid>
      <description>&lt;p&gt;As famously stated by &lt;a href="https://en.wikipedia.org/wiki/Ludwig_Wittgenstein"&gt;Ludwig Wittgenstein&lt;/a&gt;: « &lt;em&gt;The limits of my language means the limits of my world&lt;/em&gt; ». He was referring to natural languages, but this quote can be also applied to the programming world. &lt;/p&gt;

&lt;p&gt;Learning a new programming language is an intellectual journey which may help deepen your understandings of computer science. This opens the mind so that you have a different perspective on the software practice. It also exposes you to different programming paradigms. You witness how some ancient or unpopular ideas either transform into popular ones, or got forgotten to be then rediscovered again a decade afterwards. &lt;/p&gt;

&lt;p&gt;With the year 2020 around the corner, it is a good idea to also review your programming goals. In this short article I will give you four ideas plus a bonus for programming languages to learn in 2020 in order to hopefully boost your career as a software developer.&lt;/p&gt;

&lt;p&gt;“&lt;em&gt;But why should I listen to you?&lt;/em&gt;” you may rightly ask. In the end, there is no shortage of people who have an opinion about this topic. I’m not an expert in those language, but I’ve been lucky to get exposed to different programming ideas in the span of 15 years as an organizer of technical conferences with &lt;a href="https://polyconf.com/"&gt;PolyConf&lt;/a&gt; being my largest and my dearest creation. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y8hEkfdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wrdcgrjf1mvfl2juufvu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y8hEkfdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wrdcgrjf1mvfl2juufvu.png" alt="PolyConf Programming Conference"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PolyConf promotes the idea of &lt;strong&gt;polyglot programming&lt;/strong&gt;. It’s about encouraging a generalist approach to the art and craft of software development. Programmers should strive to have a comprehensive understanding of programming concepts with breadth and depth of knowledge that transcend the boundaries of a single language.&lt;/p&gt;

&lt;p&gt;During those years I’ve had a chance to meet and exchange with creators of programming languages, frameworks and software tools. I was able to witness not only new technologies emerging (like Ruby on Rails in 2005 or Node.js in 2009), but also great ideas being discarded and sometimes forgotten. This experience gave me a good insight into the field of programming. &lt;/p&gt;

&lt;p&gt;There is no particular order for this list. Also, it is not about learning all those languages. These are just &lt;strong&gt;ideas to inspire or ignite your curiosity&lt;/strong&gt; so that you can find your own path in this field.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reason
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--41-ccyKa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fepfcnzqw46q8cjuvoc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--41-ccyKa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fepfcnzqw46q8cjuvoc3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reasonml.github.io/"&gt;Reason&lt;/a&gt;  is a new syntax (and a toolchain) built on top of  &lt;a href="https://ocaml.org/"&gt;OCaml&lt;/a&gt; . It provides functional and object-oriented features with type-safety and focus on performance. Its syntax is similar to JavaScript. The intention is to make interoperation with JavaScript and adoption by JavaScript programmers easier. Reason can access both JavaScript and OCaml ecosystems. OCaml, a functional programming language with infered types, was created in 1996.  Reason builds upon the rock solid type system from Ocaml while focusing on both simplicity and performance. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://reasonml.github.io/"&gt;Reason&lt;/a&gt;  was created by Jordan Walke who also created React.js. If you like programming in React.js, you should watch Jordan’s recent talk at ReasonConf where he gives a few reasons why Reason is worth learning.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/5fG_lyNuEAw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Rust
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z_hKUkJJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o0q2mnvhdqhs994jp92l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z_hKUkJJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o0q2mnvhdqhs994jp92l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.rust-lang.org/"&gt;Rust&lt;/a&gt;  is a statically typed programming language focusing on safety, speed, and concurrency. Rust is a system language which means it generates the best possible machine code with full control of memory use. Rust is memory safe by default: all memory accesses are checked. The language is partially influenced by functional programming and its type system is similarly rich to Haskell’s. Rust can be also compiled into WebAssembly which runs in each major web browser at near-native speeds.&lt;/p&gt;

&lt;p&gt;Rust was created at Mozilla by Graydon Hoare in 2006. As the web slowly but steadily moves towards &lt;a href="https://webassembly.org/"&gt;WebAssembly&lt;/a&gt; and in some degree to serverless, it may be a good investment to learn Rust. Don’t take my word for that, but rather watch the following talk by Steve Klabnik&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/CMB6AlE1QuI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Dart
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eLG6nh4H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ybjiezxtu3figan5ch0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eLG6nh4H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ybjiezxtu3figan5ch0v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dart is an object-oriented, garbage-collected programming language with inferred types.  The language supports various compilation methods. AOT (Ahead-Of-Time) compilation allows Dart to produce native code while JIT (Just-In-Time) compilation significantly improves the development experience with features such as hot-reload. Dart can also compile to JavaScript. Since the version 2.7 the language also supports null safety, i.e. accessing object references safely without triggering null reference exceptions. Lastly, Dart is the language of Flutter, the mobile (soon web) framework that’s taking the world by storm.&lt;/p&gt;

&lt;p&gt;Dart was created by Lars Bak and Kasper Lund.&lt;/p&gt;

&lt;p&gt;I greatly enjoy &lt;a href="https://twitter.com/munificentbob"&gt;Bob’s Nystrom&lt;/a&gt; articles and talks. In the following video Bob along with Kevin Moore explain why Dart is a programming language choice with no compromises. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/J5DQRPRBiFI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Nim
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8ae6g3SG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o76jnejpht54fuooxwgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8ae6g3SG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o76jnejpht54fuooxwgw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nim is a statically typed compiled programming language with a syntax inspired by Python. It was designed to be as fast as C and as easy to read as Python. Being a compiled language, Nim is fast. It combines concepts from languages like Python, Ada and Modula. Some describe Nim as an easier to learn Rust or as a faster Python. It can be compiled to C, C++, Objective-C or JavaScript. It offers both automatic memory management (via Garbage Collection) and manual memory management. What sets Nim apart from other programming languages is its metaprogramming features with a powerful macro system in particular which allows manipulating the syntax tree to write custom DSLs. &lt;/p&gt;

&lt;p&gt;The lanaguage was created by Andreas Rumpf.&lt;/p&gt;

&lt;p&gt;In the following video, the creator himself, explains the almost magical power of the Nim programming language.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hwArqelfBBY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: Joy
&lt;/h2&gt;

&lt;p&gt;As a bonus, I’ve selected one of my favourite programming languages and one that is completely different than anything you may have experienced. It’s called Joy and it is a purely functional programming language devised by Manfred Von Thun. Whereas all other functional programming languages are based on the application of functions to arguments, Joy is based on the composition of functions. Every Joy function is unary, taking a stack as argument and producing a stack as value.&lt;/p&gt;

&lt;p&gt;There is no video for this one, but I encourage you to read (at least 3 times) the following &lt;a href="http://joy-lang.org/rationale-for-joy/"&gt;Rational for Joy&lt;/a&gt; by Manfred von Thun. &lt;/p&gt;




&lt;p&gt;As programmers we are supposed to constantly seek how to improve your practice, and eventually, how to expand and improve it. By being able to compare and contrast various technologies, you will be able to quickly learn what they bring to the table and in which context they could be used. Hopefully my list helps you in that journey. &lt;strong&gt;Good luck!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Are you planning to learn other programming languages in 2020 ? Let me know in the comments!&lt;/p&gt;




&lt;p&gt;Still reading this far ? Great! Let me invite you to &lt;a href="https://www.youtube.com/zaiste"&gt;my YouTube channel&lt;/a&gt; where I teach programming using different programming languages. It's free and there is not catch. :)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>career</category>
      <category>javascript</category>
    </item>
    <item>
      <title>4 Ways Of Accessing HTML Elements In The DOM</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Tue, 26 Nov 2019 11:18:01 +0000</pubDate>
      <link>https://dev.to/zaiste/4-ways-of-accessing-html-elements-in-the-dom-1jgf</link>
      <guid>https://dev.to/zaiste/4-ways-of-accessing-html-elements-in-the-dom-1jgf</guid>
      <description>&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction"&gt;DOM&lt;/a&gt; (Document Object Model) is a representation of a web page. It is a combination of elements that form a HTML document. Thanks to the DOM, programs can change the structure and content of a web document.&lt;/p&gt;

&lt;p&gt;You can access  HTML elements in a document &lt;strong&gt;by type&lt;/strong&gt;, &lt;strong&gt;their attributes&lt;/strong&gt; or &lt;strong&gt;using a unique identifier&lt;/strong&gt;. In this article we will go over the 4 ways of accessing elements in the DOM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Elements by Unique Identifier (ID)
&lt;/h2&gt;

&lt;p&gt;The  most direct way of accessing an element is by using a unique  identifier. Since the identifier is unique, this approach  will always return a single element.&lt;/p&gt;

&lt;p&gt;Let's consider the following snippet of HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is a uniquely identified title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"content"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can access each of these elements by using the &lt;code&gt;getElementById&lt;/code&gt; of the &lt;code&gt;document&lt;/code&gt; object, e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Once you display that element it will return back the corresponding HTML tag content.&lt;/p&gt;

&lt;p&gt;It is important to remember that HTML elements cannot use the same ID twice on the web page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Elements by Class
&lt;/h2&gt;

&lt;p&gt;Another way of accessing elements on a web page is by identifying them via the values of the &lt;code&gt;class&lt;/code&gt; attribute. Since the &lt;code&gt;class&lt;/code&gt; values don't have to be unique, this approach allows targeting more than one element at once.&lt;/p&gt;

&lt;p&gt;Let's consider the following snippet of HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;J. C. R. Licklider&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Claude Shannon&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can access all the &lt;code&gt;li&lt;/code&gt; elements at once using the &lt;code&gt;getElementsByClassName&lt;/code&gt; of the &lt;code&gt;document&lt;/code&gt; object, e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pioneers&lt;/span&gt; &lt;span class="o"&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;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;person&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;pioneers&lt;/code&gt; variable is a collection (an array) of HTML elements. Also, note that the &lt;code&gt;getElementsByClassName&lt;/code&gt; name uses the the plural form (&lt;code&gt;Elements&lt;/code&gt;). The &lt;code&gt;getElementById&lt;/code&gt;, however, uses the singular form (&lt;code&gt;Element&lt;/code&gt; ).&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Elements by Tag
&lt;/h2&gt;

&lt;p&gt;There is also a way to access elements on a web page by the tag name. This approach is less specific and rarely used in practice as a result.&lt;/p&gt;

&lt;p&gt;Let's consider the same snippet of HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;J. C. R. Licklider&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Claude Shannon&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can access all the &lt;code&gt;li&lt;/code&gt; elements at once using the &lt;code&gt;getElementsByTagName&lt;/code&gt; of the document object, e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pioneersAndMore&lt;/span&gt; &lt;span class="o"&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;getElementsByTagName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;li&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This approach will also return a collection (an array) of elements. On top of that it will return each and every &lt;code&gt;li&lt;/code&gt; tag in the document. If we happen to have another list on that page, but with different classes, this will also return them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Elements by CSS Selector
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors"&gt;CSS selector&lt;/a&gt; is a codified way to identify various HTML elements on a  web page. The IDs must be prefixed with the &lt;code&gt;#&lt;/code&gt; sign while classes with  the &lt;code&gt;.&lt;/code&gt; sign, e.g. &lt;code&gt;#title&lt;/code&gt; and &lt;code&gt;.person&lt;/code&gt; to identify the title and the pioneers from the previous examples. These are the most basic ways for element identification. CSS Selectors are much more powerful than that.&lt;/p&gt;

&lt;p&gt;Let's consider the following snippet of HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Internet Pioneers&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;J. C. R. Licklider&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"person"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Claude Shannon&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can now access both the title and the list elements using the query methods of the &lt;code&gt;document&lt;/code&gt; object. There is the &lt;code&gt;querySelector&lt;/code&gt; method to access a single element and &lt;code&gt;querySelectorAll&lt;/code&gt; to access more than one element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&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;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pioneers&lt;/span&gt; &lt;span class="o"&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;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.person&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Also, the &lt;code&gt;querySelectorAll&lt;/code&gt; returns a &lt;strong&gt;static collection&lt;/strong&gt; while all the &lt;code&gt;getElements*&lt;/code&gt; methods return &lt;strong&gt;live collections&lt;/strong&gt;. A live collection will auto-update once there are some changes on the web page (e.g. in response to another JavaScript program adding new elements that match the criteria of those methods).&lt;/p&gt;




&lt;p&gt;This is a concise introduction to working with HTML using JavaScript. We went over some essential ways of accessing HTML elements on a web page. This should provide a good base and a staring point to the further explore the wonderful world of the web browser.&lt;/p&gt;

&lt;p&gt;If you liked this article, consider subscribing to &lt;a href="https://www.youtube.com/zaiste"&gt;my YouTube channel&lt;/a&gt;. I produce free videos teaching programming in JavaScript, Dart and Flutter.  Also, if you'd like to see my new content right away, consider following me &lt;a href="https://twitter.com/zaiste"&gt;on Twitter&lt;/a&gt;. Till the next time!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>22 Short Lessons To Become A Mobile Programmer Using Flutter Framework </title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Sun, 17 Nov 2019 21:34:36 +0000</pubDate>
      <link>https://dev.to/zaiste/22-short-lessons-to-become-a-mobile-programmer-using-flutter-framework-d9j</link>
      <guid>https://dev.to/zaiste/22-short-lessons-to-become-a-mobile-programmer-using-flutter-framework-d9j</guid>
      <description>&lt;p&gt;Here is a list of 22 short, &lt;strong&gt;video lessons&lt;/strong&gt; that provide essential information to start developing mobile applications. This crash course is aimed for &lt;strong&gt;beginners&lt;/strong&gt; and &lt;strong&gt;non-programmers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of teaching abstract concepts and ideas in both Flutter and Dart, those lessons showcase a process of &lt;strong&gt;building an actual, mobile application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Join me in this adventure to become a great mobile programmer! :)&lt;/p&gt;

&lt;h3&gt;
  
  
  0. What is Flutter ?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://flutter.dev/"&gt;Flutter&lt;/a&gt; is a framework for building mobile applications, created at Google. You can develop both Android and iOS mobile applications, which means that it is a so-called « &lt;strong&gt;cross-platform solution&lt;/strong&gt; ». You develop it once with a single codebase written using a single programming language called Dart. Instead of using Swift for iOS and Java or Kotlin for Android.&lt;/p&gt;

&lt;p&gt;Flutter abstracts the interaction with both Android &amp;amp; iOS while still &lt;strong&gt;producing native code&lt;/strong&gt;. Simply put, you don’t need to learn different ways of writing mobile applications for different mobile platforms.This is similar to React Native, but Flutter’s advantage is that the framework, the programming language and the toolchain are developed by single company while still being open source.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MbUey9oquuU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Development Setup
&lt;/h3&gt;

&lt;p&gt;Visual Studio Code has a fantastic integration with Flutter. There are two great plugins: &lt;code&gt;Dart&lt;/code&gt; and &lt;code&gt;Flutter&lt;/code&gt; to streamline the development process. There is also a built-in &lt;strong&gt;hot reload feature&lt;/strong&gt; , which provides instant code reloading while developing the app.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/G5vxhjzYO-Q"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Creating First Flutter Application
&lt;/h3&gt;

&lt;p&gt;The Flutter plugin adds to VS Code commands to create a new project boilerplate and to launch a mobile device emulator for both Android and iOS.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/b86t20jr_wU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Stateless &amp;amp; Stateful Widgets
&lt;/h3&gt;

&lt;p&gt;Flutter is pretty similar to React or Vue.js. The notion of Component is replaced by a notion of Widget, which is basically the same thing. Similarly, we distinguish Widgets that have state as Stateful Widgets (Smart Components in React) and those without state are Stateless Widgets (Dumb Components in React).&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pFsIjiGsfqQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Listings Elements
&lt;/h3&gt;

&lt;p&gt;One of the most common and import ways to interact with a mobile application is simply by using lists. In Flutter, listing elements on screen is extremely easy thanks to the &lt;code&gt;ListView&lt;/code&gt; widget. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/TEIhOnlMudM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Assets
&lt;/h3&gt;

&lt;p&gt;A mobile device is slightly different than a web page. If there is a need to display images or handle data files that accessible offline, those need to be store on that device as assets.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pZfOQ95uab4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Using Types in Dart
&lt;/h3&gt;

&lt;p&gt;Types allows to provide a clear intent in our code.  They improve the coding experience on the lower level and at the micro scale. Dart, the language used by Flutter, is not only statically typed, but it also provides a sophisticated type inference - a way for the compiler to guess types for you.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rniuCsmxCsI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Serializing JSON
&lt;/h3&gt;

&lt;p&gt;At some point there is a need to serialize a payload, usually acquired over the wire in the JSON format. Dart &amp;amp; Flutter provide convenient helpers for such tasks.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/NkUtwePWhZo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Doing HTTP Request and Parsing HTTP Responses
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;http&lt;/code&gt; package in Dart comes with a comprehensive tool-set to perform any type of HTTP request and to efficiently parse the HTT responses.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WsgsP-AKxFo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Async / Await Syntax
&lt;/h3&gt;

&lt;p&gt;Dart supports the &lt;code&gt;async/await&lt;/code&gt; syntax out-of-the-box. In many eyes, this leads to a code which is easier to read and understand. For those, who prefer the notion of &lt;code&gt;Promise&lt;/code&gt;, Dart has &lt;code&gt;Future&lt;/code&gt;s an equivalent.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_60WdOoezmc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Navigating Between Screens
&lt;/h3&gt;

&lt;p&gt;The screen on a mobile is usually considerably smaller than the one of your laptop. The interactions result in often screen changes. In this lesson, we explain that mechanism in detail. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/TACydvfx2gE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  11. Creating Simple Forms
&lt;/h3&gt;

&lt;p&gt;Similarly to web pages, a common way to interact with a mobile application is through forms. You can enter some data via input fields or select some criteria via radio buttons or drop-down menus. Creating forms in Flutter is also pretty straightforward. This lesson shows the basics of that process.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VaWobMmVOWQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Creating More Complicated Forms
&lt;/h3&gt;

&lt;p&gt;Forms are sent in by submitting them. It may be necessary, not only to control particular fields, but also the form as a whole. Flutter allows to group different fields under a &lt;code&gt;Form&lt;/code&gt; widget, so that the form submission triggers saving all fields values in that form.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/X43DHrmwa1s"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Validating Forms
&lt;/h3&gt;

&lt;p&gt;Forms need to be validated. It is a process of accepting proper values and rejecting those that don’t conform to the rules defined for each field. Flutter comes with a built-in mechanism for validating forms.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WHJLVHgIlpI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  14. Adding Side Menu
&lt;/h3&gt;

&lt;p&gt;Side menus are used to display allowed operations along with the profile information for a currently logged in user. There is no need to build this feature from scratch in Flutter as it comes built-in.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/kVi7taaaUVM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  15. Making List Items Dissmissable
&lt;/h3&gt;

&lt;p&gt;As noted previously, lists are common in mobile applications. It is also popular to interact with list items through gestures such as swiping. In Flutter, this feature is also built-in and available as the &lt;code&gt;Dismissible&lt;/code&gt; widget.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/6WM3uUX640Y"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  16. Creating Tab Bars
&lt;/h3&gt;

&lt;p&gt;Another popular element in mobile applications is a tab bar, usually located at the top of the screen. And yes, this is also built-in in Flutter. No need to reinvent the wheel, you can simply use the &lt;code&gt;TabBarView&lt;/code&gt; widget.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/omZ9ge1ZRUI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  17. Adding Navigation Bars
&lt;/h3&gt;

&lt;p&gt;Contrary to the tab bars, the navigation bars are usually located at the bottom of the screen. In addition, they often have icons associated with each item in the bar. Once again, Flutter has your back and provides a convenient &lt;code&gt;BottomNavigationBar&lt;/code&gt; widget to quickly create that functionality.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/tz73WexQtac"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  18. Streams &amp;amp; The BLoC Pattern
&lt;/h3&gt;

&lt;p&gt;The Dart programming language has a great, built-in support for streams. This mechanism is extremely useful to deal with state in your mobile application. Along with the built-in &lt;code&gt;StreamBuilder&lt;/code&gt; you can easily rebuild a portion of your widget tree in response to changes in streams.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/PRd4Y_E2od4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  19. Combining Streams with Futures
&lt;/h3&gt;

&lt;p&gt;Streams may require some additional learning, but they also provide more flexibility than regular variables. At the beginning it may no be straightforward how to combine entities providing values once with the notion of streams, which is a stream of values. In this lesson we dive into that topic by showing how to combine an HTTP future with a stream in Flutter.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/T9aYTkF53X0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  20. Creating A Client-Side Search
&lt;/h3&gt;

&lt;p&gt;The search functionality is also something pretty common for mobile applications. And yet again, Flutter helps us out by providing a built-in mechanism to easily implement that feature. In this lesson, we show how to build a search screen.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Ndi3xxiVmv0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  21. Explaining The Inherited Widget
&lt;/h3&gt;

&lt;p&gt;In addition to Stateful and Stateless widgets, Flutter has a special widget for sharing data across the widget tree. In this episode we deep dive into that topic to fully understand how to use in order to provide our widgets with data.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WgLW38VSEVc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  22. The Sprinkle Architecture
&lt;/h3&gt;

&lt;p&gt;In this lesson, we introduce a mental model for the architecture by using a garden as the metaphor. Widgets are plants while Streams are the water sprinkles them, so that those widgets could grow or change.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/J7WJkkNvyHE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;This course is free and it will always be free. There is no catch. If you like it, found it useful or it helped you in your career, please write me a private message. Seeing and hearing from people enjoying those lessons really motivates me to produce more. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can also subscribe to &lt;a href="https://www.youtube.com/channel/UCzgkOWKcwy0uhYilE6bd1Lg"&gt;my YouTube channel&lt;/a&gt;. ;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>career</category>
      <category>flutter</category>
    </item>
    <item>
      <title>The Basics of a TypeScript Setup for Node.js with VS Code</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Fri, 15 Nov 2019 10:27:29 +0000</pubDate>
      <link>https://dev.to/zaiste/the-basics-of-a-typescript-setup-for-node-js-with-vs-code-2m08</link>
      <guid>https://dev.to/zaiste/the-basics-of-a-typescript-setup-for-node-js-with-vs-code-2m08</guid>
      <description>&lt;p&gt;&lt;a href="https://www.typescriptlang.org/" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt; is a superset of JavaScript that provides optional static typing along with type inference. It also supports modern JavaScript features, which makes it similar to the Babel project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is a complementary, &lt;a href="https://www.youtube.com/watch?v=BLoFPda7fmI" rel="noopener noreferrer"&gt;walk-through video&lt;/a&gt; on YouTube for this article where I show this TypeScript setup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;TypeScript makes working with JavaScript more enjoyable. One of the biggest advantages of using TypeScript is &lt;a href="https://code.visualstudio.com/docs/editor/intellisense" rel="noopener noreferrer"&gt;the IntelliSense feature&lt;/a&gt;, which provides a rich development environment with contextual code completions, hover info and method signature information.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5bzws1snoywd1p75bkl6.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5bzws1snoywd1p75bkl6.png" alt="TypeScript for VS Code IntelliSense feature&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the same time &lt;strong&gt;TypeScript is not necessary to write great software&lt;/strong&gt;. Most of the articles about TypeScript picture the language as the necessity. This is not true. In software, most problems come from errors in specifications and architectural mistakes.&lt;/p&gt;

&lt;p&gt;Types improve the coding experience on the lower level and at the micro scale. They greatly help with writing particular lines of code by providing a stricter, thus slightly safer coding environment.&lt;/p&gt;

&lt;p&gt;It is difficult to estimate the actual benefits, but adopting TypeScript is not something that will change your software practice in dramatic ways. There are even prominent voices saying you shouldn't use types at all.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I think this is exactly backwards, types often cripple larger codebases. #Clojure &lt;a href="https://t.co/2eJIQsmRrR" rel="noopener noreferrer"&gt;https://t.co/2eJIQsmRrR&lt;/a&gt;&lt;br&gt;
   — stuarthalloway (@stuarthalloway) September 27, 2019&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Personally I find great pleasure in using TypeScript, to the extend of not willing to write regular JavaScript anymore.&lt;/p&gt;
&lt;h3&gt;
  
  
  Simplest TypeScript Snippet
&lt;/h3&gt;

&lt;p&gt;Let's start with the simplest TypeScript code snippet, which is also not idiomatic. In other words, it's a syntaxtically correct piece of code which doesn't follow the common coding practice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript allows us to specify the type for the &lt;code&gt;message&lt;/code&gt; variable as &lt;code&gt;string&lt;/code&gt;. This &lt;strong&gt;type annotation describes a range of values that a particular variable (or constant) can take, or a particular function can return&lt;/strong&gt;. With TypeScript we can now explicitly specify the value constrains in our code. It leads to a stricter control, which is a good thing.&lt;/p&gt;

&lt;p&gt;Types, however, reduce the code flexibility. That's one of the reasons why there is no consensus in the debate of static versus dynamic typing. At the end of the day, it boils down to the personal preference and experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type Inference
&lt;/h3&gt;

&lt;p&gt;So what's wrong with this short snippet? The piece of TypeScript is not idiomatic, because TypeScript not only allows us to specify type, but is also smart enough to guess the types based on how particular variable or function is used in the code - this feature is known as &lt;strong&gt;&lt;a href="https://code.visualstudio.com/docs/editor/intellisense" rel="noopener noreferrer"&gt;type inference&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The TypeScript compiler looks at our code and infers the ranges of values for our variables, constans or functions. Type inference is something you should use as much as possible. Usually, the compiler knows better than you what types to use. Therefore, in idiomatic TypeScript, the code from above should be written as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Funny enough, it looks like a regular JavaScript. As a general rule you should not specify types in the assignments as those can be easily inferred by the TypeScript compiler; on the other hand, you should explicitly provide types for the function parameters.&lt;/p&gt;

&lt;h3&gt;
  
  
  An HTTP Server in TypeScript
&lt;/h3&gt;

&lt;p&gt;Let's now write a simple HTTP server in Node.js using TypeScript to see how VS Code supports TypeScript out of the box. You may know that VS Code is actually written in TypeScript, but the editor also provides a feature called the Automatic Types Aquisition.&lt;/p&gt;

&lt;p&gt;With the Automatic Types Aquisition VS Code automatically downloads the type definitions for the packages you use in your code. This makes using TypeScript even more convenient and straighforward.&lt;/p&gt;

&lt;p&gt;Let's initialize a TypeScript project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;typescript-with-zaiste
&lt;span class="nb"&gt;cd &lt;/span&gt;typescript-with-zaiste
npm init &lt;span class="nt"&gt;--yes&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; typescript
tsc init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and let's consider the following snippet stored in the ~app.ts~ file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IncomingMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ServerResponse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;IncomingMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ServerResponse&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello, World&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;http&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;started&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Automatic Types Acquisition being enabled by default in VS Code, I can simply type the . (the dot) after the &lt;code&gt;response&lt;/code&gt; variable to see all possible fields and methods of that object along with their documentation.&lt;/p&gt;

&lt;p&gt;This is possible thanks to those type definitions. I don't need to switch back and forward between the documentation of the http module. Everything is in one place which streamlines the coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types in Plain JavaScript
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;http&lt;/code&gt; is a core module from Node.js and Node.js is not written in TypeScript. Thus, there is no information about types in it. Plenty of popular NPM packages are still written using JavaScript as well.&lt;/p&gt;

&lt;p&gt;In order to provide type information in those cases, there is a special project called &lt;a href="https://definitelytyped.org/" rel="noopener noreferrer"&gt;DefinitelyTyped&lt;/a&gt;. The &lt;strong&gt;Automatic Type Aquisition&lt;/strong&gt; feature in VS Code aquires the type information from that project. In our example, we relied on the &lt;code&gt;@types/node&lt;/code&gt; to have this information for the &lt;code&gt;http&lt;/code&gt; module from Node.js.&lt;/p&gt;

&lt;p&gt;It is a good practice to include those types definitions explicitly in your project using the &lt;code&gt;devDependencies&lt;/code&gt; of the &lt;code&gt;package.json&lt;/code&gt;. Those using editors other than VS Code will be able then to benefit form the type definitions as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; @types/node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A TypeScript project must be first compiled (or transpiled) into JavaScript before we can run with Node.js. This transpilation process is done using the &lt;code&gt;tsc&lt;/code&gt; command line tool that comes with the &lt;code&gt;typescript&lt;/code&gt; package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to have a more streamlined process we can instruct the TypeScript compiler to constantly watch our files using the &lt;code&gt;--watch&lt;/code&gt; option and automatically recompile once there are changes within them.&lt;/p&gt;

&lt;h3&gt;
  
  
  TypeScript with VS Code
&lt;/h3&gt;

&lt;p&gt;VS Code recognizes TypeScript projects by the presence of the &lt;code&gt;tsconfig.json&lt;/code&gt; and conveniently provides the appropriate build tasks. The compilation can be trigger directly using the Command Palette and seamlessly run using the UI of the editor - there is no need to switch between the terminal and the editor anymore.&lt;/p&gt;

&lt;p&gt;We can also specify the default build task in VS Code to further simplify the whole process and have it conveniently under the build command via the editor wide key binding.&lt;/p&gt;

&lt;p&gt;This setup works for well for regular, command-line applications which we run to do a specific tasks. Once it's done, they finish. In Node.js, however, we also build web servers - long running processes that accept requests and return responses. This slightly troubles the setup of a TypeScript application. We not only need to transpile our code from TypeScript to JavaScript, but we also need to reload our Node.js server instance once this compilation is done and for each such change in our files.&lt;/p&gt;

&lt;p&gt;There are many solutions for this problem. We could use nodemon to restart both TypeScript compilation and the server once there are changes in our files - this is not optimal though, especially for bigger projects. We could also use a tool called &lt;code&gt;ts-node-dev&lt;/code&gt; which is slightly smarter and shares the TypeScript compilation between restarts. There is, however, a better solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  PM2 for Restarts in Development
&lt;/h3&gt;

&lt;p&gt;The JavaScript ecosystem is insanely rich to the point to be easily overwhelming. I prefer to keep the dependencies to minimum and to reuse what is already there. For that reason we will use the pm2 tool, which is the Node.js standard for running Node.js processes in production. This tool also provides a development mode as the pm2-dev command. Let's use it instead of adding another dependency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scripts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dev&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pm2-dev app.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's run the dev script directly using the tasks feature in VS Code in addition to the already running TypeScript compiler process via &lt;code&gt;tsc --watch&lt;/code&gt;. From now on any change in the &lt;code&gt;app.ts&lt;/code&gt; will be automatically recompiled by TypeScript and then quickly reloaded by the pm2 tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⋯
&lt;/h3&gt;

&lt;p&gt;TypeScript makes writing JavaScript more enjoyable. It reduces the probability of making typos while the type system constrains the area for mistakes.&lt;/p&gt;

&lt;p&gt;We also simplified and sped up the development process by eliminating the need to switch between the editor and the terminal - everything is now in one place, directly accessible from VS Code.&lt;/p&gt;

&lt;p&gt;That's a perfect TypeScript setup for Node.js with VS Code, indeed!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Gentle Introduction to Functional Programming in JavaScript</title>
      <dc:creator>Zaiste</dc:creator>
      <pubDate>Fri, 30 Aug 2019 18:07:31 +0000</pubDate>
      <link>https://dev.to/zaiste/a-gentle-introduction-to-functional-programming-in-javascript-11c8</link>
      <guid>https://dev.to/zaiste/a-gentle-introduction-to-functional-programming-in-javascript-11c8</guid>
      <description>&lt;p&gt;Functional programming is a programming paradigm in which you build programs by &lt;strong&gt;composing functions&lt;/strong&gt;. The computation is then the evaluation of those functions.&lt;/p&gt;

&lt;p&gt;Functional programming focuses on the usage of &lt;strong&gt;pure functions&lt;/strong&gt; and on &lt;strong&gt;avoiding shared, mutable state&lt;/strong&gt;. This programming paradigm is &lt;strong&gt;declarative&lt;/strong&gt;. Functional code is usually more concise and easier to test.&lt;/p&gt;

&lt;p&gt;JavaScript has its flaws, but at the same time the language is well adapted for functional style of programming. Functions are first-class objects. It is easy to pass them around as arguments, or to return them from other functions.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/M4EyBg1dgas"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this &lt;a href="https://www.youtube.com/playlist?list=PLhXZp00uXBk4ejkUZiDnv3R0AERA7Z4xp"&gt;mini video series&lt;/a&gt;, we will embark on an exciting journey to learn a bit about functional programming by using JavaScript. Presented concepts will be mostly universal and applicable to other programming languages.&lt;/p&gt;

&lt;p&gt;This series is created with beginners and non-programmers in mind. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't worry, we will take it slowly!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you'd like to be notified about new episodes, &lt;a href="https://www.youtube.com/zaiste"&gt;subscribe here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
