<?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: Lupita Rivera</title>
    <description>The latest articles on DEV Community by Lupita Rivera (@lupitalee).</description>
    <link>https://dev.to/lupitalee</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%2F575964%2F5125a27c-a60c-4efc-b1ee-c299ae3b50dd.jpeg</url>
      <title>DEV Community: Lupita Rivera</title>
      <link>https://dev.to/lupitalee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lupitalee"/>
    <language>en</language>
    <item>
      <title>Git/GitHub Commands</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Tue, 20 Dec 2022 22:18:38 +0000</pubDate>
      <link>https://dev.to/lupitalee/gitgithub-commands-gba</link>
      <guid>https://dev.to/lupitalee/gitgithub-commands-gba</guid>
      <description>&lt;p&gt;Git is a version control system that allows developers to track and manage changes to their codebase. GitHub is a platform that provides hosting for Git repositories, as well as tools for collaboration and version control. In this blog post, we'll explore some common Git/GitHub commands that you may find useful when working with Git and GitHub.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git init&lt;/code&gt;: This command initializes a new Git repository in the current directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone&lt;/code&gt;: This command creates a local copy of a remote repository. For example, git clone &lt;a href="https://github.com/user/repo.git"&gt;https://github.com/user/repo.git&lt;/a&gt; will create a local copy of the repository located at &lt;a href="https://github.com/user/repo.git"&gt;https://github.com/user/repo.git&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add&lt;/code&gt;: This command adds a file to the staging area. For example, git add file.txt will add file.txt to the staging area.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git commit&lt;/code&gt;: This command saves changes to the local repository. For example, git commit -m "Added new feature" will commit all staged changes with the message "Added new feature".&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt;: This command pushes local commits to a remote repository. For example, git push origin master will push all local commits to the master branch of the origin remote.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt;: This command fetches and merges changes from a remote repository. For example, git pull origin master will fetch and merge changes from the master branch of the origin remote.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git branch&lt;/code&gt;: This command allows you to create, list, or delete branches. For example, git branch new-feature will create a new branch called new-feature, git branch will list all branches, and git branch -d new-feature will delete the new-feature branch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git merge&lt;/code&gt;: This command merges one branch into another. For example, git merge new-feature will merge the new-feature branch into the current branch.&lt;/p&gt;

&lt;p&gt;These are just a few of the many Git/GitHub commands that are available. With these commands, you should be able to get started working with Git and GitHub to track and manage changes to your codebase. :)&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>What is ARIA &amp; why is Important t use?</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Tue, 20 Dec 2022 22:11:22 +0000</pubDate>
      <link>https://dev.to/lupitalee/what-is-aria-why-is-important-t-use-43db</link>
      <guid>https://dev.to/lupitalee/what-is-aria-why-is-important-t-use-43db</guid>
      <description>&lt;p&gt;ARIA, or the Accessible Rich Internet Applications suite, is a set of standards developed by the World Wide Web Consortium (W3C) to help make the web more accessible to people with disabilities. These standards provide a set of attributes that can be added to HTML elements to provide additional information about the element's role, state, and behavior to assistive technologies such as screen readers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Using ARIA is important for several reasons:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Improved accessibility: ARIA attributes help to provide additional context and information about elements on the page to assistive technologies, which can improve the accessibility of the page for users with disabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better user experience: By providing additional information about the purpose and behavior of elements on the page, ARIA can help to improve the overall user experience for all users, not just those with disabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Legal compliance: In many countries, there are laws and regulations that require websites to be accessible to people with disabilities. Using ARIA can help to ensure that a website is compliant with these requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SEO benefits: Google has stated that it takes accessibility into account when ranking websites in search results. Using ARIA can help to improve a website's SEO by making it more accessible to search engines and users alike.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using ARIA is not a replacement for good semantic HTML, but rather an additional tool that can be used to enhance the accessibility of a website. It is important to carefully consider the use of ARIA attributes and to ensure that they are used appropriately and in conjunction with good semantic HTML.&lt;/p&gt;

&lt;p&gt;In summary, ARIA is an important tool for improving the accessibility and usability of websites for people with disabilities, and its use can also bring benefits for all users and for SEO.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>Initializing a Git Repository</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Tue, 20 Dec 2022 21:57:08 +0000</pubDate>
      <link>https://dev.to/lupitalee/initializing-a-git-repository-e50</link>
      <guid>https://dev.to/lupitalee/initializing-a-git-repository-e50</guid>
      <description>&lt;p&gt;Git is a version control system that allows developers to track changes to files and collaborate with others on software projects. In this post, we'll go over some common Git commands and how to use them.&lt;/p&gt;

&lt;p&gt;Initializing a Git Repository&lt;br&gt;
Before you can use Git to track changes to your project, you'll need to initialize a new repository. To do this, use the git init command in the terminal while inside the root directory of your project:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git init
&lt;/h3&gt;

&lt;p&gt;This will create a new .git directory in your project, which will be used to store information about your repository.&lt;/p&gt;

&lt;p&gt;Cloning a Git Repository&lt;br&gt;
If you want to work on an existing Git repository, you can clone it to your local machine using the git clone command. This will create a local copy of the repository, including all of its history and branches.&lt;/p&gt;

&lt;p&gt;To clone a repository, you'll need to have the URL of the repository. You can find this by navigating to the repository on a hosting service like GitHub and copying the URL from the address bar.&lt;/p&gt;

&lt;p&gt;To clone the repository, use the git clone command followed by the repository URL:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git clone &lt;a href="https://github.com/user/repo.git"&gt;https://github.com/user/repo.git&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This will create a new directory with the same name as the repository, and clone the repository into it.&lt;/p&gt;

&lt;p&gt;Adding and Committing Changes&lt;br&gt;
Once you have a Git repository set up, you can start making changes to your project and tracking those changes with Git.&lt;/p&gt;

&lt;p&gt;To add a file to the staging area, use the git add command followed by the file name:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git add index.html
&lt;/h3&gt;

&lt;p&gt;This will add the index.html file to the staging area, which is a holding place for changes that you want to commit. You can also use the git add . command to add all modified files in the current directory and its subdirectories to the staging area.&lt;/p&gt;

&lt;p&gt;Once you've added the changes you want to commit to the staging area, use the git commit command to commit the changes. You'll need to include a commit message to describe the changes you're making:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git commit -m "Updated the homepage layout"
&lt;/h3&gt;

&lt;p&gt;This will create a new commit in your repository with the changes you added to the staging area.&lt;/p&gt;

&lt;p&gt;Viewing Differences&lt;br&gt;
To view the differences between two versions of a file, you can use the git diff command. This command shows you the changes that have been made to a file since the last commit.&lt;/p&gt;

&lt;p&gt;For example, to see the differences between the current version of a file and the version in the last commit, use the git diff command followed by the file name:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git diff index.html
&lt;/h3&gt;

&lt;p&gt;You can also use the git diff HEAD command to see the differences between the current version of a file and the version in the last commit for all modified files in the repository.&lt;/p&gt;

&lt;p&gt;Working with Branches&lt;br&gt;
Git allows you to create branches, which are separate copies of your repository that you can work on independently. This is useful when you want to make changes to your project without affecting the main development branch.&lt;/p&gt;

&lt;p&gt;To view the branches in your repository, use the git branch command:&lt;/p&gt;

&lt;h3&gt;
  
  
  $ git branch
&lt;/h3&gt;

&lt;p&gt;This will list all of the branches in your repository.&lt;/p&gt;

</description>
      <category>github</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is Web Accessibility?</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Mon, 24 Jan 2022 17:05:34 +0000</pubDate>
      <link>https://dev.to/lupitalee/what-is-web-accessibility-2jch</link>
      <guid>https://dev.to/lupitalee/what-is-web-accessibility-2jch</guid>
      <description>&lt;p&gt;According to Google 15% of the world's population, experience some form of disability. People with disabilities, on average as a group, are more likely to experience adverse socioeconomic outcomes than People without disabilities.&lt;/p&gt;

&lt;p&gt;61 million adults in the United States live with a disability. 26 percent (one in 4) of adults in the United States have some type of disability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Accessibility?
&lt;/h4&gt;

&lt;p&gt;Accessibility, also known as the ability to access, means that devices, services, and products are accessible to people with disabilities. Some people have to use assistive technologies which make these things accessible for them.&lt;/p&gt;

&lt;p&gt;However, people with disabilities can’t access web content if it is not meeting the accessibility principles. These users are missing the possibilities that come with technology. All users should have access to them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xKcdv_ek--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0k0qgrf2w60ueck8csd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xKcdv_ek--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0k0qgrf2w60ueck8csd.png" alt="spectrum of permanent, temporary, and situational mismatches that people experience based on their abilities and disabilities" width="880" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if you're designing websites you have to know what accessibility for websites means. over the last year lawsuits over websites which are not accessible has been on the rise. so actually legally if you're a designer you need to know Web Accessibility.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is the WCAG?
&lt;/h4&gt;

&lt;p&gt;WCAG stands for the Web Content Accessibility  Guidelines. The &lt;a href="https://www.w3.org/TR/WCAG21/"&gt;Web Content Accessibility  Guidelines&lt;/a&gt; (WCAG 2.1 guidelines) are arguably the most influential protocols shaping web accessibility policy.&lt;/p&gt;

&lt;p&gt;there's a spectrum of permanent, temporary, and situational mismatches that people experience based on their abilities and disabilities.&lt;/p&gt;

&lt;p&gt;To really understand why the WCAG matters so much, you need to know who is behind them. The WCAG was created by the World Wide Web ConsortiumNew Window, known as the &lt;a href="https://www.w3.org/"&gt;W3C&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;W3C originally focused on standardizing web protocols so that websites and web tools would be compatible with each other. Every W3C standard is reviewed several times, tested, and analyzed before it’s approved by members. Usually, W3C standards have 3 levels of compliance, from A to AAA. &lt;/p&gt;

&lt;h4&gt;
  
  
  What is Section 508?
&lt;/h4&gt;

&lt;p&gt;Strictly speaking,  &lt;a href="https://www.section508.gov/"&gt;Section 508&lt;/a&gt; is a set of rules for government entities, although it includes any organizationsNew Window that receive federal funding. &lt;/p&gt;

&lt;p&gt;That means that government-supported institutions like museums or universities, medical centers that accept Medicaid or Medicare, and programs run by organizations that are partially federally funded all have to abide by Section 508.&lt;/p&gt;

&lt;p&gt;Section 508’s accessibility rules also affect contractors or third-party workers that provide services for government bodies or organizations that receive federal funds. That means that any digital platform or website that’s in any way connected with a body that receives federal funds and is used by the public, has to comply with Section 508. &lt;/p&gt;

&lt;p&gt;Small businesses should keep this in mind if they want to go after government grants or contract work with federal agencies. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>designer</category>
      <category>developer</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Configuring Git/GitHub</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Tue, 18 Jan 2022 17:13:41 +0000</pubDate>
      <link>https://dev.to/lupitalee/configuring-gitgithub-c69</link>
      <guid>https://dev.to/lupitalee/configuring-gitgithub-c69</guid>
      <description>&lt;p&gt;This will be a blog in two parts the first one  Configuring Git/GitHub and the second Understanding more about Git/GitHub Commands which will be released soon. Lets gets get started!&lt;/p&gt;

&lt;p&gt;but first you might ask what is the difference between local repository and remote repository?&lt;/p&gt;

&lt;p&gt;The local repository is on your machine (git) and the remote repository is on the cloud (github). okay now lets get started.&lt;/p&gt;

&lt;h4&gt;
  
  
  Install git
&lt;/h4&gt;

&lt;p&gt;Git generally comes pre-installed with most operating systems, but you can check by running git version in the terminal. If this gives you an error or does not come back with a version number, you'll need to install Git. You can install it using Homebrew.&lt;/p&gt;

&lt;p&gt;1) Open the "Terminal" &lt;br&gt;
2) Type &lt;code&gt;brew install git&lt;/code&gt; and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;&lt;br&gt;
3) Close the "Terminal"&lt;br&gt;
4) Reopen the "Terminal" &lt;br&gt;
5) Type &lt;code&gt;git --version&lt;/code&gt; and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you see a message starting with "git version...", continue below.&lt;/p&gt;

&lt;h4&gt;
  
  
  Create a GitHub Account
&lt;/h4&gt;

&lt;p&gt;To work on and get credit for for your work, you will need to sign up for a GitHub account if you don’t already have one.&lt;br&gt;
&lt;a href="https://github.com/join"&gt;Github signup webpage&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure Git and GitHub
&lt;/h4&gt;

&lt;p&gt;Git is the tool that we’ll use to download and upload the work that we do. To use Git without signing in every time, you can create a Secure Shell (SSH) key and associate that to your GitHub account. This step will ask you to do work both in your browser and your terminal.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the "Terminal"&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git config --global color.ui true&lt;/code&gt; and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git config --global user.name&lt;/code&gt; + &lt;code&gt;&amp;lt;Space&amp;gt;&lt;/code&gt; + your name and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt; (Note: this should be your full name, not your GitHub username, in quotes.)&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git config --global user.email&lt;/code&gt; + &lt;code&gt;&amp;lt;Space&amp;gt;&lt;/code&gt; + the email address you used to sign up to GitHub and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;ssh-keygen&lt;/code&gt; and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For each prompt do not type anything, just continue to press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;cat ~/.ssh/id_rsa.pub | pbcopy&lt;/code&gt; and press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt;. This will copy your SSH key to your clipboard&lt;/li&gt;
&lt;li&gt;Open the &lt;a href="https://github.com/settings/ssh/new"&gt;GitHub New SSH key form&lt;/a&gt;(Note: you need to be logged in to GitHub to access that link.)&lt;/li&gt;
&lt;li&gt;Type "My personal Mac" in the "Title" input field&lt;/li&gt;
&lt;li&gt;Paste what’s on your clipboard from step seven in the "Key" input field&lt;/li&gt;
&lt;li&gt;Click "Add SSH Key"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hopefully this post will help some of you get started with Git/Github.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>github</category>
      <category>git</category>
      <category>gettingstarted</category>
    </item>
    <item>
      <title>Props in react</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Thu, 14 Oct 2021 02:01:18 +0000</pubDate>
      <link>https://dev.to/lupitalee/props-in-react-1ogp</link>
      <guid>https://dev.to/lupitalee/props-in-react-1ogp</guid>
      <description>&lt;p&gt;This short blog post will attempt to clearly summarize the concept of props in a way that the newest of programming students can understand.&lt;/p&gt;

&lt;p&gt;Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called “props”).&lt;br&gt;
props(stands for properties)and return React elements describing what should appear on the screen.&lt;/p&gt;

&lt;p&gt;Props can be strings, objects, arrays or functions&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%2Fghsf5tzjnnukc23k8ya4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghsf5tzjnnukc23k8ya4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;following the &lt;a href="https://reactjs.org/docs/components-and-props.html" rel="noopener noreferrer"&gt;React Docs&lt;/a&gt; Props are Read-Only, immutable and the Component cannot change its own props. &lt;br&gt;
They are also able to be passed between your components, generally from parent to child.&lt;/p&gt;

&lt;p&gt;on the other hand you can pass props from CHILD component back up to the PARENT component. how you might ask ?&lt;/p&gt;

&lt;p&gt;We have 2 components:&lt;br&gt;
Parent: App.js&lt;br&gt;
Child: Child.js&lt;/p&gt;

&lt;p&gt;Use the following steps:&lt;br&gt;
-Create a function inside your parent component, pass it a parameter and log that parameter using console.log .&lt;/p&gt;

&lt;p&gt;-Pass the function name as props into your child component render.&lt;/p&gt;

&lt;p&gt;-Invoke the function from props inside your child component.&lt;/p&gt;

&lt;p&gt;-Pass in your data as an argument inside the invocation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parent Component
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwvmx2gc7k1rh5uq7p8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwvmx2gc7k1rh5uq7p8u.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Child Component
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcu7u4t2deg019pog8bsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcu7u4t2deg019pog8bsl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading — I hope this provided some good value&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>what are arrow functions</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Thu, 14 Oct 2021 00:13:35 +0000</pubDate>
      <link>https://dev.to/lupitalee/what-are-arrow-functions-15me</link>
      <guid>https://dev.to/lupitalee/what-are-arrow-functions-15me</guid>
      <description>&lt;p&gt;before we jump into what is an arrow function lets talk about functions in JavaScript. before ES6 every time we wrote a function we use the word Function Keyword,&lt;/p&gt;

&lt;p&gt;ex,&lt;br&gt;
&lt;code&gt;const divide = function (x,y){&lt;br&gt;
return x/y;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;we could had an Anonymous function&lt;br&gt;
or a name function &lt;/p&gt;

&lt;p&gt;ex,&lt;br&gt;
&lt;code&gt;function divide(){&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;but we still using the &lt;code&gt;function&lt;/code&gt; keyword. and that could get kinda lengthy in our code specially when we are using more complex code and always passing in the function keyword.&lt;/p&gt;

&lt;p&gt;so this is where arrow functions come in.&lt;/p&gt;

&lt;p&gt;Arrow function is one of the features introduced in the ES6 version of JavaScript. It allows you to create functions in a cleaner way compared to regular function expression.&lt;/p&gt;

&lt;p&gt;but theres also on some situations they do behave differently. we will talk about that as we go but for now what this really means is that makes the function shorter in a way of writing a function.  &lt;/p&gt;

&lt;h2&gt;
  
  
  SYNTAX
&lt;/h2&gt;

&lt;p&gt;ex, from the divide function from above lets write in as an arrow function &lt;/p&gt;

&lt;p&gt;&lt;code&gt;const divide = (x,y) =&amp;gt; {&lt;br&gt;
return x/y;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Implicit Return
&lt;/h3&gt;

&lt;p&gt;we can also write as an implicit return  that means i wont need the return keyword and we get rid of the curly braces and replace it with  parenthesis &lt;/p&gt;

&lt;p&gt;ex,&lt;br&gt;
&lt;code&gt;cont divide = (x,y) =&amp;gt; (x / y)&lt;/code&gt; whatever expression is inside of the parenthesis will be automatically returned, it's an explicit return. &lt;/p&gt;

&lt;p&gt;but we can also write it even shorter &lt;code&gt;cont divide = (x,y) =&amp;gt; x / y&lt;/code&gt;  by taking out the parenthesis. you can only do this if you have a single expression, you cannot pass a &lt;code&gt;if else statement&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;but this is not the only difference between arrow functions and regular functions. if we go to the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  other differences:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Use of this keyword
&lt;/h3&gt;

&lt;p&gt;unlike Regular functions, arrow function does not have their own "this" keyword. like a regular function expression does.&lt;br&gt;
the keyword this is going to change is going to be set in a given function depending on how the function is called.&lt;/p&gt;

&lt;p&gt;but with an arrow function the keyword this is not going to change relative to the context or the parent that the function is define in.&lt;/p&gt;

&lt;p&gt;ex, &lt;/p&gt;

&lt;p&gt;&lt;code&gt;const person ={&lt;br&gt;
    name: "Lupita",&lt;br&gt;
    sayHi: function () {&lt;br&gt;
console.log(this.name, "says hi!")&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;code&gt;person.sayHi()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;okay when i call person.sayHi the value of &lt;code&gt;this&lt;/code&gt; is going to be determined by how I'm calling it, I'm calling it sayHi() on person the object person will be the value of this - this.name should be Lupita. so when i run the code i get &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Lupita says hi!&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However if i use an arrow function instead &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%2Fq45tn95d4o8d2kkc01zf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq45tn95d4o8d2kkc01zf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we just get &lt;code&gt;says hi!&lt;/code&gt; so whats going on here is that the value of this is not being changed , not being set when im calling person.sayHi() like a normal function would. if we look at just &lt;code&gt;this&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const person ={&lt;br&gt;
    name: "Lupita",&lt;br&gt;
    sayHi:()=&amp;gt; {&lt;br&gt;
console.log(this)&lt;br&gt;
console.log(this.name, "says hi!")&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrq3ax02h4bhou1kszm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrq3ax02h4bhou1kszm6.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we see here this is just set to the window objet, just as if this function where defined on its own no inside of the person object. and it doesn't matter how i call that function &lt;br&gt;
if its an arrow function the value of this is not going to be set to that person object unless i where to bind it. but it's own an arrow function does not  get a new or diff value for this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using a new keyword
&lt;/h2&gt;

&lt;p&gt;Regular functions created using function declarations or expressions are constructible and callable. Regular functions are constructible; they can be called using the new keyword.&lt;/p&gt;

&lt;p&gt;However, the arrow functions are only callable and not constructible, i.e., arrow functions can never be used as constructor functions.&lt;/p&gt;

&lt;p&gt;ex,&lt;/p&gt;

&lt;h4&gt;
  
  
  regular function
&lt;/h4&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%2F8ljdzd91c360k4nr1jsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ljdzd91c360k4nr1jsv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as you can see it returns 5, &lt;/p&gt;

&lt;h4&gt;
  
  
  Arrow function
&lt;/h4&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%2Fnufeeoy1bsi3s1uqzdm4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnufeeoy1bsi3s1uqzdm4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So this is basically Arrow functions. If you want further reference, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;br&gt;
is a good place to check.&lt;/p&gt;

&lt;p&gt;Thank you for reading :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>connect React with Redux</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Sat, 09 Oct 2021 23:31:09 +0000</pubDate>
      <link>https://dev.to/lupitalee/connect-react-with-redux-1gk4</link>
      <guid>https://dev.to/lupitalee/connect-react-with-redux-1gk4</guid>
      <description>&lt;p&gt;How to connect React with Redux - if you a newbie like me you might feel like i don't even know where to start. well my friend i got you covered. &lt;/p&gt;

&lt;p&gt;React + Redux are widely used and popular technologies for developing the the front-end of the web project. we are also will be talking about Thunk middleware and what it does for us.&lt;br&gt;
but first let's check out and see what Redux is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jqc2e-ST--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/541obf1ziozl7wyav3fn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jqc2e-ST--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/541obf1ziozl7wyav3fn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Redux is a tiny state management library.&lt;br&gt;
It’s meant to make your state management more predictable, and centralize your React state data, and state logic.&lt;/p&gt;

&lt;p&gt;Redux solves these problems&lt;/p&gt;

&lt;h3&gt;
  
  
  1: Single source of truth
&lt;/h3&gt;

&lt;p&gt;Your entire app state data is in one object tree.&lt;/p&gt;

&lt;p&gt;This tree may also be known as a store.&lt;/p&gt;

&lt;p&gt;By maintaining a single store it allows you to be debug or inspect your application much easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  2: State is read-only
&lt;/h3&gt;

&lt;p&gt;Your store data gets passed down as React props. Which React doesn’t allow you to modify the props object directly.&lt;/p&gt;

&lt;p&gt;Redux only allows you to update your store data through a functions called dispatch which you must defined the action to trigger.&lt;/p&gt;

&lt;p&gt;These actions, describe what will be changing or happening to the store.&lt;/p&gt;

&lt;h3&gt;
  
  
  3: Changes are made
&lt;/h3&gt;

&lt;p&gt;known as reducers, which are attached to an action.&lt;/p&gt;

&lt;p&gt;The job of a reducer is to get the current state and an action and return the next state.&lt;/p&gt;

&lt;p&gt;So when you make a call to an action such as, FETCH_CATEGORIES.&lt;/p&gt;

&lt;p&gt;Redux will take that action request, check if it exists and if it has a reducer attached to it.&lt;/p&gt;

&lt;p&gt;It will then execute that reducer function to update the store data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a thunk? What is thunk middleware? Why use it with Redux?
&lt;/h2&gt;

&lt;p&gt;-Redux Thunk is middleware that allows you to return functions, rather than just actions, within Redux. This allows for delayed actions, including working with promises. ... Redux Thunk allows us to dispatch those actions asynchronously and resolve each promise that gets returned.&lt;/p&gt;

&lt;p&gt;OKAY! Let's get Started&lt;/p&gt;

&lt;p&gt;first lets start by installing these libraries&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npm install Redux&lt;/li&gt;
&lt;li&gt;npm install redux-thunk&lt;/li&gt;
&lt;li&gt;npm install react-redux&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;lets use my code as an example, in my public directory that holds the initial index.html file. Also have a src directory that holds a few important files for this application to work.&lt;/p&gt;

&lt;h4&gt;
  
  
  index.js – It’s responsible for making Redux available in the React application
&lt;/h4&gt;

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

&lt;p&gt;in the code above lets break it down and see what each import does for us.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;createStore&lt;/code&gt; this creates a store that holds our state&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Provider&lt;/code&gt; provides the store to the App and pass in the constant variable store.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rootReducer&lt;/code&gt; is one of the arguments in the create store - function that returns a new version of the state&lt;/p&gt;

&lt;p&gt;&lt;code&gt;compose&lt;/code&gt; is used to add both enhancers to create store. 1) apllyMiddleware(thunk) 2)windows devTools.&lt;/p&gt;

&lt;h4&gt;
  
  
  App.js
&lt;/h4&gt;

&lt;p&gt;i created a route &lt;code&gt;&amp;lt;Route exact path="/categories" component={Categories}/&amp;gt;&lt;/code&gt; by using: &lt;a href="https://reactrouter.com/web/guides/quick-start"&gt;React-Router&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and if i go to my categories component here where awesomeness happens.&lt;/p&gt;

&lt;h4&gt;
  
  
  Categories.js
&lt;/h4&gt;

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

&lt;p&gt;as you can see I'm using class Component but you can use it as  a functional component but i haven't learn Hooks so wont be able to tell you how to use it with functional component, my apologies there but on my next blog i should be able to have a good hold of the functional components using Hooks.&lt;/p&gt;

&lt;p&gt;okay let's break this down, at the very top of the file you see several imports let's just focus on the last two. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;connect&lt;/code&gt; the connect function let’s a React component latch itself onto the Redux store.&lt;/p&gt;

&lt;p&gt;The connect function does not modify the component, but it  pass any state data from the Redux store, and it provides a function called dispatch.&lt;/p&gt;

&lt;p&gt;Redux connect accepts 2 parameters &lt;/p&gt;

&lt;p&gt;In the example above I’m passing in only the first parameter which Redux calls, mapStateToProps.&lt;/p&gt;

&lt;h4&gt;
  
  
  mapStateToProps:
&lt;/h4&gt;

&lt;p&gt;is a function that allows you to pass the  Redux store data you want.&lt;/p&gt;

&lt;h4&gt;
  
  
  mapDispatchProps:
&lt;/h4&gt;

&lt;p&gt;the second argument, allows you to create custom dispatch functions and pass them to the React component.&lt;br&gt;
which in our case is &lt;code&gt;{fetchCategory}&lt;/code&gt; thus will fetch our categories.&lt;/p&gt;

&lt;p&gt;in a new Directory under src make a new directory name actions and there create a file i named it category.js&lt;/p&gt;

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

&lt;p&gt;I want to trigger the GET_CATEGORY Redux action by using dispatch, and supply the categories value in a property called payload.&lt;/p&gt;

&lt;p&gt;payload is a common practice when passing data through dispatch.&lt;/p&gt;

&lt;h4&gt;
  
  
  Creating Redux store file
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;export const initialState ={&lt;br&gt;
    category:[]&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;code&gt;const categoriesReducer = (state = initialState, action ) =&amp;gt;{&lt;br&gt;
    switch(action.type) {&lt;br&gt;
        case "GET_CATEGORY":&lt;br&gt;
            return {&lt;br&gt;
                ...state, &lt;br&gt;
                category: [...action.payload] &lt;br&gt;
            }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I’m creating a function called categoriesReducer, that glues together the initial state, and the actions.&lt;br&gt;
int the switch statement we have a case for 'GET_CATEGORY' which is the same as the one we have in our actions file. which we taking in all of the categories being fetched. and now we are displaying those categories. that you see in the Categories component.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>redux</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Thats so fetch!</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Mon, 02 Aug 2021 03:17:44 +0000</pubDate>
      <link>https://dev.to/lupitalee/thats-so-fetch-144l</link>
      <guid>https://dev.to/lupitalee/thats-so-fetch-144l</guid>
      <description>&lt;p&gt;Yes, the first thing that came to my mind as i heard the word fetch in JavaScrip. i was like "what does Mean girls, have to todo with coding!"&lt;br&gt;
but its actually a word that has a different meaning of what the movie implies, let check this fetch out and what it does in JavaScript.&lt;/p&gt;

&lt;p&gt;fetch() in its simplest definition, is a function in JavaScript for interacting with the database, especially with APIs (Application Programming Interface). &lt;/p&gt;

&lt;p&gt;there are four types of requests that Fetch provides us with:&lt;/p&gt;

&lt;h4&gt;
  
  
  1)GET requests — used for retrieving or “fetching” data.
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;2)POST requests — used for uploading or adding data.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3)PATCH / PUT requests — used for editing data that is already in the database.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  4)DELETE requests — used for deleting a piece of data.
&lt;/h4&gt;

&lt;p&gt;In this blog we are going to go over two of this fetches a GET and POST using my JS project.&lt;br&gt;
lets start with the first fetch.&lt;/p&gt;

&lt;p&gt;this is how  a basic fetch function looks like.&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%2Fpr8jzosg5yfyqive4kzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpr8jzosg5yfyqive4kzr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if we enter the above code in the console will return a promise, every successful Fetch request will always return a promise and along with this promise comes a response using the &lt;strong&gt;.then&lt;/strong&gt; method we then took the response and converted it to JSON or JavaScript Object Notation is the format for how we transmit data through web applications. see code below&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%2Fx9q67msa8d3zvwa4oh0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9q67msa8d3zvwa4oh0n.png" alt="Screen Shot 2021-08-01 at 9.19.14 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you see, the data was fetched and we now have the data we wanted. from there we can choose what todo with it. what I did is iterate over and  chose the first Shop and this first shop has Items. as you can see to fetch our database we did the same thing to fetch the items which in this case are Sushi rolls. &lt;/p&gt;

&lt;p&gt;but what about if we want to now create items and add to out backend ? well first we need to create our &lt;em&gt;form&lt;/em&gt; then grab the values of this form to send to the backend.&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%2F6de1vvvfgvnxch7ru5er.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6de1vvvfgvnxch7ru5er.png" alt="Screen Shot 2021-08-01 at 9.33.32 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;quick thought, On the &lt;em&gt;form&lt;/em&gt; don't forget to call the event.preventDefault()method to prevent the default submit behaviour of the browser.&lt;/p&gt;

&lt;p&gt;Okey  lets move on, Before sending the HTTP POST request, by using the Fetch API we need to prepare the new  object based on what has been entered in the form.&lt;br&gt;
The values which have been entered in the input elements are stored in the variables titleInput and imageInput and are used to create a new object.&lt;br&gt;
The HTTP POST request is sent by calling the fetch function. Two parameters are passed into this function call:&lt;br&gt;
&lt;strong&gt;1) the URL as string&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2) a configuration object&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;second argument. In this object, we have three key-value pairs. The first is the request we’re making to the database or backend. In this case, it’s a POST request. The next pair value, the headers contains information about the data being sent. Content-type states what format the data will be sent in. Accept simply means what format we’ll accept the data in. The last key-value pair represents the information about the attributes needed to create an item in stringified form. Then it gets the response, converts it into Javascript, and console logs the data.&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%2Fwb97uevjxv7fimcv9dwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwb97uevjxv7fimcv9dwq.png" alt="Screen Shot 2021-08-01 at 10.00.18 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Summary all of this information can be confusing at first. I certainly had difficulty wrapping my head around it at first but a little of practice you will be able to understand it. Thank you! Happy coding! &lt;/p&gt;

&lt;p&gt;resources: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch" rel="noopener noreferrer"&gt;MDN Using fetch&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Omniauth with google_ oauth2 on rails</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Tue, 04 May 2021 23:00:16 +0000</pubDate>
      <link>https://dev.to/lupitalee/omniauth-with-google-oauth2-on-rails-5eka</link>
      <guid>https://dev.to/lupitalee/omniauth-with-google-oauth2-on-rails-5eka</guid>
      <description>&lt;p&gt;what if you could set up your account with a third party logging? when I first heard this I was so excited to get started and use this gem. Omiauth gem is awesome!. but when I actually started implementing it on my project was completely lost and gave me a bunch of errors.&lt;/p&gt;

&lt;p&gt;one of the errors was URI's not matching and the other one was missing current_id. follow me step by step to get this done the right way and smoothly continue with your project. &lt;/p&gt;

&lt;p&gt;so the First step to implementing google authentication is to get a developer account on their website. '&lt;a href="https://console.developers.google.com" rel="noopener noreferrer"&gt;https://console.developers.google.com&lt;/a&gt;'&lt;br&gt;
Once the account is created you will be on your home page, then select credentials.&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%2F6hno17m3t1k6khq3wx1f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hno17m3t1k6khq3wx1f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;then you should click on the Create Project button on the top right side of the screen, which will take you to another page to give your project a name, and organization if you don't have an Organization you can skip that fill, and select create.&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%2Fxbxyda1g1l9qrrn1o3oa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbxyda1g1l9qrrn1o3oa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;when create selected will send you to the dashboard and will pop up a notification from there you can select your project.  if you see this warning below go ahead and select Configure consent screen, this needs to be done before you create the credentials.&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%2F2kp360j9v6me03u8uzhr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2kp360j9v6me03u8uzhr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;will ask you to choose one of the two options for our app we will select the external and select create.&lt;br&gt;
then after filling up the requirements which are App name and User support email and scroll all the way at the bottom and under Developer Contact information add your email and save and continue. in the next two screens just select save and continue.&lt;/p&gt;

&lt;p&gt;now you should be able to select credentials on the left side of the screen and then click on the create credentials button at the top of the page. Select the OAuth client ID option for your authentication needs.&lt;br&gt;
once you see the below photo will give you different options for your application type, ill be working with a web application so this one will be the one ill be choosing.&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%2F0lzgc7vbh47leopxszkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lzgc7vbh47leopxszkl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the Authorized redirect URIs is very important here you need to give your client proper callback urls, which will get access to google's authentication information. Once your app does the typical google authentication requests, your application will need to get back some information, and these urls are the ones that are authorized to receive. once you added the Uri and save it will give you the client ID and Client Secret ID these is what you will need to add to your code. so let's jump into the editor. &lt;/p&gt;

&lt;p&gt;Add gem 'omniauth-google-oauth2'&lt;br&gt;
gem 'dotenv-rails'&lt;br&gt;
gem "omniauth-rails_csrf_protection" to your Gemfile then run bundle install.&lt;br&gt;
Now that you have your gems, let's first start with our environment. In Rails, to set up your environment, you'll need to use your initializers and create an Omniauth.rb file. inside this file you will add the  middleware code below &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%2Fqkhcw0fnx3zezpvjjzji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqkhcw0fnx3zezpvjjzji.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ENV is referencing the client ID and secret from the client page where you included certain URI's. You'll have to include these in the .env at the root of the folder and then assigned their keys to their respective values. Make sure to include your keys in the gitignore file to hide them from public view.&lt;/p&gt;

&lt;p&gt;You can now access the OmniAuth Google OAuth2 URL: /auth/google_oauth2 which we will add in the /congif/routes.erb &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%2Fwgxusm2xp1w3qfi3alwe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgxusm2xp1w3qfi3alwe.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;and also dont forget to add your button to your /views/sessions/new&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%2Fj8gci6kd0fxev7qulwlv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8gci6kd0fxev7qulwlv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On your routes, notice the callback is routed to a sessions controller, where we'll handle the creation of a session. Notice the below photo, here we will need to process the response we received from Google and either create a new user or log in an existing user. There are many approaches to this, so please keep in mind I am simply showing you my approach.&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%2Fcg8eqgvpqfrbvmyhcaj3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcg8eqgvpqfrbvmyhcaj3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you are implementing this for your own project, I’d highly encourage you to pause your code inside the omniauth method with either binding.pry or byebug and add in the terminal request.env['omniauth.auth']  look at the response to see how to grab the info you need for your User model.&lt;/p&gt;

&lt;p&gt;also, make sure you add the uid and provider to your users table.&lt;/p&gt;

&lt;p&gt;ex: rails g migration addUidAndProviderToUsers uid provider&lt;/p&gt;

&lt;p&gt;Then you will want to run rails db:migrate to update the users table.&lt;/p&gt;

&lt;p&gt;Up to this point, I had followed the documentation and various tutorials. You should now be able to run your rails server and log in with Google. Please let me know if you have any comments, questions, or suggestions.&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%2Fl5wculbx8nh8sa6msexm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5wculbx8nh8sa6msexm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Resources:&lt;br&gt;
&lt;a href="https://github.com/zquestz/omniauth-google-oauth2" rel="noopener noreferrer"&gt;https://github.com/zquestz/omniauth-google-oauth2&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/bkeepers/dotenv" rel="noopener noreferrer"&gt;https://github.com/bkeepers/dotenv&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/cookpad/omniauth-rails_csrf_protection" rel="noopener noreferrer"&gt;https://github.com/cookpad/omniauth-rails_csrf_protection&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rails</category>
      <category>google</category>
      <category>omniauth</category>
    </item>
    <item>
      <title>Let's talk RESTful Routes</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Sat, 27 Mar 2021 18:34:49 +0000</pubDate>
      <link>https://dev.to/lupitalee/let-s-talk-restful-routes-1ecl</link>
      <guid>https://dev.to/lupitalee/let-s-talk-restful-routes-1ecl</guid>
      <description>&lt;p&gt;While starting on my Sinatra project I was literally lost on my routes felt like I was inside a maze wandering around without finding an end. here where I realized I need to go back to my reading and review what I had learned in the lessons. join me and let's figure it out together the way out of this maze.&lt;/p&gt;

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

&lt;p&gt;Let's start with what is REST? (Representation State Transfer) is an architectural style for defining our routes. It is a way of mapping HTTP routes and the CRUD functionalities. then what are Routes? are the code that is responsible for listening and receiving requests and then deciding what to send back. and for last what is CRUD? when building an application, we want to provide the four basic types of functionality. There must be a way to Create, Read, Update, and Delete resources.&lt;/p&gt;

&lt;p&gt;for example, The internet would be a really confusing place without a convention for how to handle URLS - to delete an Instagram photo might be &lt;a href="http://www.instagram.com/delete-this-photo"&gt;www.instagram.com/delete-this-photo&lt;/a&gt;, but Twitter might be &lt;a href="http://www.twitter.com/remove-this-tweet"&gt;www.twitter.com/remove-this-tweet&lt;/a&gt;. Without a specific convention to follow, it would be hard to create new content, edit content, and delete it. this is where RESTful conventions come in, to provides a pattern where users and developers can consistently manipulate data and be on the same page.&lt;/p&gt;

&lt;p&gt;The 7 RESTful routes. let's use my code routes as an example,&lt;/p&gt;

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

&lt;p&gt;I also noticed that browsers behave a little strangely as it relates to PUT, PATCH and DELETE requests, in that they don't know how to send those requests.so in order to get them to send we need to hide the request inside a Form, that delete and edit need to be submitted via POST requests. see an example below.&lt;/p&gt;

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

&lt;p&gt;the form must include a hidden input field that will submit our form via delete. The second line above is what does this for us.&lt;/p&gt;

&lt;p&gt;These 7 routes will get any web app started. You’ve got all the basics to use CRUD actions and the RESTful routes to create, read, and manipulate data.&lt;/p&gt;

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

&lt;p&gt;By following this pattern, you don’t have to reinvent the wheel every time you build a new CRUD app. The routes and method names have already been decided is like following line exits inside the maze that someone already left behind for us to follow that way we can easily go in and out without getting lost. &lt;/p&gt;

&lt;p&gt;thank you for joining me and together we were able to find the exit to start coding!&lt;/p&gt;

</description>
      <category>coding</category>
      <category>http</category>
      <category>crud</category>
      <category>mvc</category>
    </item>
    <item>
      <title>Understanding Iterations &amp; Enumerators</title>
      <dc:creator>Lupita Rivera</dc:creator>
      <pubDate>Sun, 28 Feb 2021 06:15:11 +0000</pubDate>
      <link>https://dev.to/lupitalee/understanding-iterations-4pf4</link>
      <guid>https://dev.to/lupitalee/understanding-iterations-4pf4</guid>
      <description>&lt;p&gt;Staring my first CLI project I notice I was falling behind on iterations which made things hard to even get my code started. follow and join me on my journey of going back to review the lessons of iteration and Enumerators in ruby.&lt;/p&gt;

&lt;p&gt;Starting with the word iteration itself - means that is a way to operate on a collection object, like an array, and do something with each element in that collection. I notice there are different types of iterations and Enumerators for example; EACH, COLLECT/MAP, FIND/DETECT FIND_ALL/SELECT, let's go over these iterations, and Enumerators find out how they operate.&lt;/p&gt;

&lt;p&gt;Starting with Each, this iterator is just another method of an object. the main feature is that iterates on each element of the collection always returning the original collection. you can use it also on an array, hashes, and range. see below example,&lt;/p&gt;

&lt;p&gt;[ 1, 2, 3 ].each { |n| puts n }&lt;br&gt;
1&lt;br&gt;
2&lt;br&gt;
3&lt;br&gt;
 =&amp;gt; [1, 2, 3] &lt;/p&gt;

&lt;p&gt;The next iteration that will be looking at is Collect/Map these two iterations are aliases that can be used interchangeably. It passes each collection item to the block and returns a new collection containing the values returned by the block. see below example,&lt;/p&gt;

&lt;p&gt;a = [ "lydia", "Anthony", "mike" ]&lt;/p&gt;

&lt;p&gt;a.map { |x| x.upcase } &lt;/p&gt;

&lt;p&gt;=&amp;gt;  ["LYDIA", "ANTHONY", "MIKE"] &lt;/p&gt;

&lt;p&gt;Now let's take a look at the next ones, select/find_all these methods will not do calculations on collection, but it will allow us to select specific elements from the base collection based on logical conditions. If an element of the collection will fulfill the condition, then it will stay in the collection. If no, element will be removed from the collection. see below example&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       array = [1,2,3,4,5,6]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;array.select {|num| num.even?} =&amp;gt; [2,4,6]&lt;br&gt;
array.find_all {|num| num.even?} =&amp;gt; [2,4,6]&lt;/p&gt;

&lt;p&gt;This Enumerator is very useful when you want to choose only a specific group of elements. You are not interested in all collection, but with a small part of it. but only when it comes to arrays, we can use .select and .find_all interchangeably.&lt;/p&gt;

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

&lt;p&gt;but When it comes to iterating over hashes, this is when we see the difference between .select and .find_all. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   hash= {a:1,b:2,c:3,d:4,e:5,f:6}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;hash.select {|key,value| value.even?} &lt;br&gt;
=&amp;gt; {:b=&amp;gt;2, :d=&amp;gt;4, :f=&amp;gt;6}&lt;/p&gt;

&lt;p&gt;hash.find_all {|key,value| value.even?} &lt;br&gt;
=&amp;gt;[[:b, 2],[:d, 4],[:f, 6]]&lt;/p&gt;

&lt;p&gt;Notice in the above example how .select  returns the value in the original input in this case a hash. but .find_all return the key: value pairing in an array. so .find_all output is always an array.&lt;/p&gt;

&lt;p&gt;So far we already know how iterations and Enumerator work! having this understanding help me figure out how I was going to manipulate my data that I scraped on an API. and gave my project a solid ground to rise up. Thank you for following throughout on this journey now we have an understanding of iterations and Enumerators. &lt;/p&gt;

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

</description>
    </item>
  </channel>
</rss>
