<?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>Forem: Oreste Abizera</title>
    <description>The latest articles on Forem by Oreste Abizera (@oreste).</description>
    <link>https://forem.com/oreste</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%2F537874%2F43fcad68-cb53-4064-a574-260251aecd39.jpg</url>
      <title>Forem: Oreste Abizera</title>
      <link>https://forem.com/oreste</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oreste"/>
    <language>en</language>
    <item>
      <title>The Web of Life: Understanding the Architecture of the World Wide Web</title>
      <dc:creator>Oreste Abizera</dc:creator>
      <pubDate>Tue, 20 Jun 2023 16:21:30 +0000</pubDate>
      <link>https://forem.com/oreste/the-web-of-life-understanding-the-architecture-of-the-world-wide-web-gmc</link>
      <guid>https://forem.com/oreste/the-web-of-life-understanding-the-architecture-of-the-world-wide-web-gmc</guid>
      <description>&lt;p&gt;Welcome to the intricate world of the World Wide Web, where a complex architecture connects individuals, organizations, and information across the globe. In this article, we will explore the foundational components and mechanisms that make the web function seamlessly, enabling collaboration, communication, and the dissemination of knowledge on a massive scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Client-Server Model: Facilitating Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the core of the web's architecture lies the client-server model. When you interact with the web, your web browser acts as the client, while web servers store and deliver the requested information. This model facilitates communication between your device and the server, allowing you to access web pages, multimedia content, and other resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hypertext Transfer Protocol (HTTP): The Language of the Web&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Hypertext Transfer Protocol (HTTP) serves as the language that enables communication between your web browser and the server. When you request a web page, your browser sends an HTTP request, and the server responds with an HTTP response, providing the necessary data. This standardized protocol ensures seamless exchange of information on the web.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. URLs: Navigating the Web&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Uniform Resource Locators (URLs) act as addresses for resources on the web. They consist of different components, including the protocol (HTTP/HTTPS), the domain name (such as "example.com"), and the path (specific location within the website). URLs allow you to navigate the web, directing your browser to the desired web pages, documents, images, or other online resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Hyperlinks: Interconnecting the Web&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hyperlinks are the fundamental building blocks of the interconnected web. They serve as clickable links embedded within web pages, connecting you to related content, external sources, or different sections within a website. Hyperlinks make navigation effortless, enabling you to explore a vast network of information with a simple click.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Markup Languages: Structuring Web Content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Markup languages like HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), and JavaScript play pivotal roles in shaping the structure, design, and interactivity of web content. HTML provides the backbone, defining the structure of a web page, while CSS enhances its visual presentation. JavaScript adds dynamic features, enabling interactive elements and functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Web Servers and Web Hosting: Storing and Serving Content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Web servers are the backbone of the web, storing web pages and delivering them upon request. They ensure the availability and accessibility of websites and their associated resources. Web hosting services provide the infrastructure to host websites, making them accessible to users worldwide. Together, web servers and hosting services make the web content accessible to anyone with an internet connection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. The Distributed Nature of the Web: Ensuring Reliability and Scalability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The web operates on a distributed network architecture, comprising numerous interconnected servers, data centers, and networks spread across the globe. This decentralized approach ensures reliability, scalability, and resilience. Content Delivery Networks (CDNs) further enhance performance by caching and delivering web content from servers located closer to the user, reducing latency and improving loading times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The architecture of the World Wide Web encompasses a dynamic ecosystem of components and protocols that seamlessly connect users to information, services, and each other. By understanding the client-server model, HTTP, URLs, hyperlinks, markup languages, and the distributed nature of the web, we gain a deeper appreciation for the intricate framework supporting the web's vast landscape. Embrace this knowledge and continue to explore the boundless possibilities that the Web of Life offers.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning by books or videos?</title>
      <dc:creator>Oreste Abizera</dc:creator>
      <pubDate>Tue, 27 Apr 2021 06:42:32 +0000</pubDate>
      <link>https://forem.com/oreste/learning-by-books-or-videos-f</link>
      <guid>https://forem.com/oreste/learning-by-books-or-videos-f</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Self-taught developer&lt;/em&gt;&lt;/strong&gt;, this is a term which is mostly used in the programming field to refer to someone who has taken programming skills in any way apart from college. They use any kind of means like attending training, reading books, watching videos, etc. Here the question arises, what to choose between learning by reading books and learning by watching videos? Let's tackle it in this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick note:&lt;/em&gt;&lt;/strong&gt; This article is not only for self-taught developers but also for college students who are learning new things after studies or revising their courses.&lt;/p&gt;

&lt;p&gt;From the Twitter poll I made, many like studying by watching videos than reading books&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1384112999003164672-638" src="https://platform.twitter.com/embed/Tweet.html?id=1384112999003164672"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1384112999003164672-638');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1384112999003164672&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;I'm going to pass through some merits and demerits of both techniques and this will help you to decide which one can work for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Merits of Learning By Videos&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl165xgpw9wud3y6vy2l.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl165xgpw9wud3y6vy2l.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;1. &lt;code&gt;Engages more senses (audio) and adds motion&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
Learning by videos engages more sense than learning by books. When you want to learn by hearing the sound, that's okay go ahead and if you want to read the words the instructor is saying in the video, no worries turn on subtitles. This flexibility of learning by videos is a great advantage.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. &lt;code&gt;Video how-to’s stronger than photos or illustrations – great for physical skills&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
When it comes to learning how to do something, I prefer the usage of videos. Let's take an example that I'm learning to code (I'm a beginner) and I want to write a program that will sum up two numbers. If I choose a book I can just go there and copy the code and paste it in my IDE and I'm not sure that I will get well what the code means. I prefer taking a video and seeing the instructor coding from the start to the end of the program. I will see the most common errors he/she will face and how they will be solved. I will realise every change of the program after every change in code instead of just going and grabbing the final working code without knowing what every line does. Simply that's why I will go for videos on this scenario.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. &lt;code&gt;Feels more conversational&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
When watching videos while learning, you feel like you are having a conversation with your instructor. This helps you to not get bored by the course although you may also get bored like if the course is very big or not properly understood.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Merits of Learning By Books&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjud9fjq22a2y85gqk5xh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjud9fjq22a2y85gqk5xh.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;1. &lt;code&gt;Not tied to a computer or electronic device&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
This is one of the most important points about learning by books, &lt;strong&gt;"you are not tied to an electronic device"&lt;/strong&gt;. This is the fact that when you don't have access to computers or other electronic devices at a moment, you can still sharpen your skills while learning by reading the books. I know many people are not good fans of reading but it's just something that you have to practice because it might help you one time.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. &lt;code&gt;We can search e-book&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
One of the great advantages of e-books is that you can make a search in the book and jump right to the point you want. Let's take an example that someone sent me a book called "Introduction to Javascript volume 1" and I have some experience with Javascript, maybe what I want to learn right now are &lt;strong&gt;Callback functions&lt;/strong&gt;. I can search for that keyword and if it is available in the book, I will jump right away to the topic of Callback functions and I will be able to study what I want with no much struggles.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. &lt;code&gt;Smaller storage&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
Storing 1000+ eBooks/GB compared to 23 minutes of HD video/GB is favourable to people who don't have devices with large storage. Books take small space on the memory. When you will need to store a lot of information and have a small space, I would recommend using books.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learning By Books drawbacks&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frt67ok5r2sl8axapxg54.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frt67ok5r2sl8axapxg54.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;1. &lt;code&gt;Color Illustrations/pictures are usually limited&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
In many hard books, you will find only black and white pictures and Illustrations. This can lead to bad transaction of message from the book to the readers. This may even discourage someone from continuing to read the book's content even if it may contain useful information.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. &lt;code&gt;Harder to learn a practical course&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
While learning by books, this issue is one of the most issues faced by many people. When learning a practical course using books it is not easy to identify how the book writer wanted something to be done. You can see the result but you will not realize the steps where he/she reached and stop a bit before continuing. You won't know the errors he faced when making practice and how he solved them and when you meet them it will give you much headache. This occurs because mainly in the books, they show only the working part.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;code&gt;3. Consume a lot of time&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
There are millions of books in the libraries and online stores like Amazon. A lot of them contains above 150 pages. It is too hard to read more than 4 or 5 books. This is hard because it takes a lot of time to read a book and finish it. When you will have to read a lot of them, you will be forced to read them fast hence losing some important key points in the book.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learning By Videos drawbacks&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgrwl4hhk3s0fmb7ekwr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgrwl4hhk3s0fmb7ekwr.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;1. &lt;code&gt;Voice or manner of speaking can be distracting&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
It always occurs that the voice or manner of teaching of an instructor can distract you. For example, if you are watching a course and the instructor's voice is very low then learning that course becomes more difficult. Another example is when an instructor is saying many ehm,um,... This may also distract you and discourage you to learn the course.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. &lt;code&gt;Can’t jump right to the area you need&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
Here I don't mean to say that you can't skip some parts of the video or jump to a given minute and seconds. What I mean is that if I know the topic I want to study in that video, there is no way I can force the video to jump to the topic I want. Considering the example I talked about above on the merits of Learning by books, when I have a &lt;strong&gt;Callback functions&lt;/strong&gt; topic and I have a video, there is no way I can jump to my topic when I don't know the minute where it is. This is a big drawback of learning by videos.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. &lt;code&gt;Large storage requirements&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
As technology is increasing, videos are also being developed and qualities are developing. Improvement of qualities goes with an increase in storage. Videos with high qualities like &lt;strong&gt;1080p, 4k,...&lt;/strong&gt; takes more space on the memory which may be a big hindrance to some people who can't afford to buy devices with large storage. This will limit them to keep a lot of videos on their devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
In recent years, videos are developing at a high rate whereby now we have technologies like video conferencing where people can talk to each other live. Books also remain as one of the major ways to store information and learn whether you have an electronic device or not.&lt;/p&gt;

&lt;p&gt;When deciding a way of learning between these two, I recommend that you must try them and choose the one that works best for you.&lt;/p&gt;

&lt;p&gt;opinions of Twitter users:&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1383723977575604227-344" src="https://platform.twitter.com/embed/Tweet.html?id=1383723977575604227"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1383723977575604227-344');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1383723977575604227&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Thanks for reading this article until this line. If you prefer, you can let me know what you think about this topic and which one you like among those two learning techniques. I hope you liked it, feel free to share it. You can find me anytime on &lt;a href="https://twitter.com/AbizeraOreste" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/coder__tauras" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;. See you in the next article!😍😍&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to use Dev.to article API's in react js your project.</title>
      <dc:creator>Oreste Abizera</dc:creator>
      <pubDate>Sun, 17 Jan 2021 13:36:48 +0000</pubDate>
      <link>https://forem.com/oreste/how-to-use-dev-to-article-api-s-in-react-js-your-project-2jbo</link>
      <guid>https://forem.com/oreste/how-to-use-dev-to-article-api-s-in-react-js-your-project-2jbo</guid>
      <description>&lt;p&gt;In recent days, I started writing articles on &lt;a href="https://dev.to"&gt;Dev.to&lt;/a&gt;. I found it more interesting (thanks to &lt;a href="https://dev.to"&gt;Dev.to&lt;/a&gt; developers team). After that, I wanted to add my articles on my personal site as long as I post them on &lt;strong&gt;&lt;em&gt;Dev&lt;/em&gt;&lt;/strong&gt;. I found an interesting API which we are going to explore and see how to use in &lt;strong&gt;&lt;em&gt;react&lt;/em&gt;&lt;/strong&gt;. &lt;em&gt;Welcome:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Let's get started:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
First of all, we are going to use this endpoint: &lt;a href="https://dev.to/api/articles?username=oreste"&gt;https://dev.to/api/articles?username=oreste&lt;/a&gt;. Feel free to change username to fetch articles from another user. mine is &lt;code&gt;oreste&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Initialize your project&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Create a react project by using &lt;a href="https://create-react-app.dev/docs/getting-started/" rel="noopener noreferrer"&gt;create-react-app&lt;/a&gt; or any other approach you prefer.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsg11a2vuev1zdqyxe9yp.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsg11a2vuev1zdqyxe9yp.JPG" alt="Alt Text" width="194" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Edit &lt;code&gt;App.css&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Edit &lt;code&gt;App.css&lt;/code&gt; and add the following code: &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0ypo54qoyqmk82zji2d1.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0ypo54qoyqmk82zji2d1.JPG" alt="Alt Text" width="765" height="501"&gt;&lt;/a&gt;&lt;br&gt;
At this point, we are fetching articles and keep them in our state. No output on the screen yet, but since we have consoled &lt;code&gt;articles&lt;/code&gt;, when we look at the console we should see something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdv9wgpxwguafdeznuk4y.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdv9wgpxwguafdeznuk4y.JPG" alt="Alt Text" width="332" height="108"&gt;&lt;/a&gt;&lt;br&gt;
You can expand the arrays to see the content of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Display articles in the browser&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Now after accessing our data in the console, we need to display them within the browser. Replace &lt;code&gt;{/* content goes here */}&lt;/code&gt; comments with this code:&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;articles&lt;/span&gt;&lt;span class="dl"&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;articles&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;article&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;article&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;title&lt;/span&gt;&lt;span class="dl"&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;article&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;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/a&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;social_image&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&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;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/img&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&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;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&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;Read&lt;/span&gt; &lt;span class="nx"&gt;More&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/a&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&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;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readable_publish_date&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&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;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_reactions_count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;reactions&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add Some &lt;code&gt;css&lt;/code&gt; in &lt;code&gt;App.css&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.articles&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0.7rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.article&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.articles&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-around&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Our App is now finished:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F65y45hwoex4fyuu5w4va.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F65y45hwoex4fyuu5w4va.JPG" alt="Alt Text" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks For reading this article. I hope you &lt;em&gt;enjoyed&lt;/em&gt; it. If you want the code of the app, find it &lt;a href="https://github.com/oreste-abizera/dev-to-articles" rel="noopener noreferrer"&gt;here&lt;/a&gt;. You can also test it &lt;a href="https://dev-to-articles.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. To read more about &lt;strong&gt;FileReader&lt;/strong&gt; visit this &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader" rel="noopener noreferrer"&gt;site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can find me anytime on &lt;a href="https://twitter.com/AbizeraOreste" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/coder__tauras" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;. Have a nice day😍😍&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Image Live Preview app with React.js</title>
      <dc:creator>Oreste Abizera</dc:creator>
      <pubDate>Mon, 28 Dec 2020 15:25:23 +0000</pubDate>
      <link>https://forem.com/oreste/image-live-preview-app-with-react-js-1350</link>
      <guid>https://forem.com/oreste/image-live-preview-app-with-react-js-1350</guid>
      <description>&lt;p&gt;In the beginning, the web was only text. And it was somehow boring. It didn't take too long for the introduction of images (one of the best types of content) on the web. Today we are not going to talk about how to upload images. We are going to look at how to &lt;strong&gt;preview an image&lt;/strong&gt; on the frontend before uploading it to the server. &lt;em&gt;Hope you don't get bored.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'm using &lt;a href="https://reactjs.org" rel="noopener noreferrer"&gt;React js&lt;/a&gt; in this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's get started:
&lt;/h3&gt;

&lt;p&gt;Firstly create a react js project by using &lt;strong&gt;create-react-app&lt;/strong&gt; or another approach you want.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fakpc6lfxg6bdc77i215k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fakpc6lfxg6bdc77i215k.JPG" alt="Alt Text" width="180" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;App.js&lt;/code&gt; and insert this code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3f3nlrc4c69e21076o29.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3f3nlrc4c69e21076o29.jpg" alt="Alt Text" width="800" height="526"&gt;&lt;/a&gt;&lt;br&gt;
The result will be:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff91are298hro416nh5tm.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff91are298hro416nh5tm.JPG" alt="Alt Text" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;handleFile&lt;/code&gt; function with these codes:&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;tempFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&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;reader&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;FileReader&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;load&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;setfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reader&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="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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tempFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readAsDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tempFile&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;I added a few CSS in &lt;code&gt;App.css&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5rem&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nc"&gt;.output&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;218&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;213&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;213&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.output&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&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;Finally, our app has a new look.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2kpa0dbayf067czen8rl.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2kpa0dbayf067czen8rl.JPG" alt="Alt Text" width="658" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading this article until this line. If you want the code of the app, find it &lt;a href="https://github.com/oreste-abizera/image-live-preview" rel="noopener noreferrer"&gt;here&lt;/a&gt;. You can also test it &lt;a href="https://image-live-preview.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. To read more about &lt;strong&gt;FileReader&lt;/strong&gt; visit this &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader" rel="noopener noreferrer"&gt;site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can find me anytime on &lt;a href="https://twitter.com/AbizeraOreste" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/coder__tauras" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;. Have a nice day😍😍&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Basic javascript string methods and properties you should know</title>
      <dc:creator>Oreste Abizera</dc:creator>
      <pubDate>Thu, 24 Dec 2020 08:15:10 +0000</pubDate>
      <link>https://forem.com/oreste/basic-javascript-string-methods-and-properties-you-should-know-3d8o</link>
      <guid>https://forem.com/oreste/basic-javascript-string-methods-and-properties-you-should-know-3d8o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Strings&lt;/strong&gt; are one of the essential features found in programming. Simply they are pieces of text. I am sure that you will come across it in every programming language you might be using(if you didn't). In this article, let's look at basic javascript &lt;strong&gt;string methods&lt;/strong&gt; you should know.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's get started:&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. String length&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;length&lt;/code&gt; property is one of the properties you will probably use in strings. It returns the length of the string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frqs58uw5ox1x9o5hvj6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frqs58uw5ox1x9o5hvj6n.png" alt="Alt Length" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Convert to Lowercase&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;toLowerCase&lt;/code&gt; method returns the lowercase version of the string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F480a4hn24c6i1nah9glt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F480a4hn24c6i1nah9glt.png" alt="Alt Text" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Convert to Uppercase&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;toUpperCase&lt;/code&gt; method returns the uppercase version of the string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuh6eqeymv42xqcu6yexm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuh6eqeymv42xqcu6yexm.png" alt="Alt Text" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. startsWith method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;startsWith&lt;/code&gt; method returns whether the string starts with the provided string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk6cgbsi73cvgqokgncob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk6cgbsi73cvgqokgncob.png" alt="Alt Text" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. endsWith method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;endsWith&lt;/code&gt; method returns whether the string ends with the provided string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx5mut3mhaff56w1izplg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx5mut3mhaff56w1izplg.png" alt="Alt Text" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. includes method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;includes&lt;/code&gt; method checks whether a string contains the specified string/characters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxn3rui4ml2r53rvivuyz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxn3rui4ml2r53rvivuyz.png" alt="Alt Text" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. charAt method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;charAt&lt;/code&gt; method Returns the character at the specified index (position).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1b51210lqpg7sd2w7pda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1b51210lqpg7sd2w7pda.png" alt="Alt Text" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. concat method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;concat&lt;/code&gt; method joins two or more strings and returns a new joined strings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1j7ibfsnurli2oczxzl9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1j7ibfsnurli2oczxzl9.png" alt="Alt Text" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. repeat method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;repeat&lt;/code&gt; method Returns a new string with a specified number of copies of an existing string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqz8qow1da099a83j0nkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqz8qow1da099a83j0nkf.png" alt="Alt Text" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. slice method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;slice&lt;/code&gt; method extracts a part of a string and returns a new string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbtqa6yb04xtai9vylwt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbtqa6yb04xtai9vylwt1.png" alt="Alt Text" width="772" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. replace method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;replace&lt;/code&gt; method searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvd2yvonzkeohb4647f6o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvd2yvonzkeohb4647f6o.png" alt="Alt Text" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. split method&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;split&lt;/code&gt; method is used to split a string into an array of substrings and return the new array. If an empty string is used as the separator, the string is split between each character.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6tnihgxbg0qb4kav1k8y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6tnihgxbg0qb4kav1k8y.png" alt="Alt Text" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13. trim method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;trim&lt;/code&gt; method removes whitespaces from both ends of the string. It does not change the original string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxf9ia6lzb1ukhkdqsb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxf9ia6lzb1ukhkdqsb4.png" alt="Alt Text" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14. substr method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;substr&lt;/code&gt; method gets a substring beginning at the specified location and having the specified length.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faomqnn8ido7eunfouskw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faomqnn8ido7eunfouskw.png" alt="Alt Text" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;15. substring method&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;substring&lt;/code&gt; method extracts the characters from a string, between two specified indices, and returns the new substring. It does not include the &lt;strong&gt;end&lt;/strong&gt; index.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6jlnmgre3zsa8lhtbhws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6jlnmgre3zsa8lhtbhws.png" alt="Alt Text" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are some basic string methods you should know. I promise you will need them sometime.&lt;/p&gt;

&lt;p&gt;Did you find it helpful? You can find me on &lt;a href="https://twitter.com/AbizeraOreste" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;. Have a nice day!😍😍&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>node</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
