<?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: logan-lampton</title>
    <description>The latest articles on DEV Community by logan-lampton (@loganlampton).</description>
    <link>https://dev.to/loganlampton</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%2F913574%2F0057c154-2b4a-4158-a30b-c9680a96de4b.png</url>
      <title>DEV Community: logan-lampton</title>
      <link>https://dev.to/loganlampton</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/loganlampton"/>
    <language>en</language>
    <item>
      <title>What is useContext?</title>
      <dc:creator>logan-lampton</dc:creator>
      <pubDate>Wed, 16 Nov 2022 18:00:49 +0000</pubDate>
      <link>https://dev.to/loganlampton/what-is-usecontext-4m5m</link>
      <guid>https://dev.to/loganlampton/what-is-usecontext-4m5m</guid>
      <description>&lt;p&gt;Just what is useContext good for and how do we use it? Luckily it's simple in React!&lt;/p&gt;

&lt;p&gt;useContext is a great tool to manage state globally in JavaScript. It is used to pass state between components without having to "prop drill" or pass information between a bunch of components as props, which can quickly get more confusing than it needs to be.&lt;/p&gt;

&lt;p&gt;A simple example is if we want to keep state for a user across components, which we'll take a look at now.&lt;/p&gt;

&lt;p&gt;In this example, we'll presume you are in the App.js file, but you can use useContext wherever you'd like! You can import useContext from React, declare your useContext, export it all in one simple line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const UserContext = React.createContext()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From here you would declare the state that you'll be passing on, which in our example is you, the cool reader:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const [currentUser, setCurrentUser] = useState("Cool Reader")  

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

&lt;/div&gt;



&lt;p&gt;Within the return of the function you'll use the useContext to wrap your components. A simple solution would end up looking like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  const [user, setUser] = useState("Cool Reader");

  return (
    &amp;lt;UserContext.Provider value={user}&amp;gt;
      &amp;lt;h1&amp;gt;{`Hello, ${user}!`}&amp;lt;/h1&amp;gt;
      &amp;lt;Example Component /&amp;gt;
    &amp;lt;/UserContext.Provider&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our UserContext.Provider could easily be wrapped around many components and save us a lot of time with props. I recommend giving it a go Cool Reader!&lt;/p&gt;

&lt;p&gt;For more info, please check out:&lt;br&gt;
&lt;a href="https://reactjs.org/docs/hooks-reference.html#usecontext"&gt;ReactJS.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/react/react_usecontext.asp"&gt;W3 Schools&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Ruby Active Record Validations Intro</title>
      <dc:creator>logan-lampton</dc:creator>
      <pubDate>Tue, 25 Oct 2022 19:39:58 +0000</pubDate>
      <link>https://dev.to/loganlampton/ruby-active-record-validations-intro-45co</link>
      <guid>https://dev.to/loganlampton/ruby-active-record-validations-intro-45co</guid>
      <description>&lt;p&gt;It's a powerful feeling once we have our database up and running and able to take the data provided by our users and persistently save that data on the backend. But how can we make sure that the user provides the data that we need and only in a format that makes sense for comparing with the rest of the information in our database? For example, we want to make sure that users provide a username and password when signing up for an account on our website and can't just leave the password input blank. That's where validations come in!&lt;/p&gt;

&lt;p&gt;First let's take a look at where validations are located in Ruby active record. You'll be adding any validations you create to the app/models file. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4lvbRYRi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyf08ezyzijekz3w90k5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4lvbRYRi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyf08ezyzijekz3w90k5.png" alt="Image description" width="880" height="757"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our example, we are creating a very important database for dogs wearing hats, so we will add our validations to the file: app/models/hatdogs which is currently blank:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord
end

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XG30Ftl---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewwkjsvn57i6lo67s9nt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XG30Ftl---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewwkjsvn57i6lo67s9nt.jpg" alt="Image description" width="880" height="1100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Behold a Hatdog! (Photo by &lt;a href="https://unsplash.com/@meghankix?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Meghan Hessler&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/dog-hat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before we add our validations, we'll want to take a look at what kind of data we are looking for. This can be found in our schema or Hatdog migration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateHatdogs &amp;lt; ActiveRecord::Migration[7.0]
  def change
    create_table :hatdogs do |t|
      t.string :name
      t.integer :age
      t.string :image
      t.string :catchphrase

      t.timestamps
    end
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want a name, age, image and catchphrase for each object. All of these will have the type of string, except for age. For each validation, we will use the "validates" keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Presence&lt;/strong&gt;&lt;br&gt;
If we want to make sure that when users go to add a new Hatdog on the front-end, that they provide a name, age and image, we can easily do so with the presence: true validation, like so.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord

    validates :name, presence: true
    validates :age, presence: true
    validates :image, presence: true

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Numericality&lt;/strong&gt;&lt;br&gt;
We'd like for users to only use integers for age, so that we stop getting things like "Old!" submitted to our database. We can use numericality for that. Let's add it to our current validation for :age.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord

    validates :name, presence: true
    validates :age, presence: true, numericality: { only_integer: true }
    validates :image, presence: true

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---kkeRZ-Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28wggpujv707wje5ov4b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---kkeRZ-Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28wggpujv707wje5ov4b.jpg" alt="Image description" width="880" height="1100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Definitely not too old! (Photo by &lt;a href="https://unsplash.com/@mandacreatespretty?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Manda Hansen&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/dog-hat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;greater_than_or_equal_to and less_than_or_equal_to&lt;/strong&gt;&lt;br&gt;
Let's add some more validations to age, so that we don't get crazy numbers like -1 and 1000.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord

    validates :name, presence: true
    validates :age, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 25 }
    validates :image, presence: true

end

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Uniqueness&lt;/strong&gt;&lt;br&gt;
Let's say we want each picture to be unique to prove we have different Hatdogs. (We're not going down the rabbit hole of hoping that each dog name is completely unique!) To make sure the user input is unique, we'll use uniqueness.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord

    validates :name, presence: true
    validates :age, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 25 }
    validates :image, presence: true, uniqueness: true

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Length&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's add a validation for the catchphrase! We don't want users submitting an essay, so let's limit how long the catchphrase can be to a maximum of 150 characters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Hatdog &amp;lt; ApplicationRecord

    validates :name, presence: true
    validates :age, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 25 }
    validates :image, presence: true, uniqueness: true
    validates :catchphrase, length: { maximum: 150 }

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yBwMGcWp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f84g6nxyg6z1tu0wnxei.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yBwMGcWp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f84g6nxyg6z1tu0wnxei.jpg" alt="Image description" width="880" height="880"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Catchphrase: "I let the dogs out" (Photo by &lt;a href="https://unsplash.com/@jamie452?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Jamie Street&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/dog-hat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is just the beginning of all the helpful ways that validations can help you keep your data clean and useful. For more information to help with your continued development, please take a look at the official Ruby documentation. It's great (if a little lacking in dog images) read: &lt;a href="https://guides.rubyonrails.org/active_record_validations.html"&gt;https://guides.rubyonrails.org/active_record_validations.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>ruby</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Ruby, Active Record, and Tables</title>
      <dc:creator>logan-lampton</dc:creator>
      <pubDate>Tue, 04 Oct 2022 19:25:15 +0000</pubDate>
      <link>https://dev.to/loganlampton/ruby-active-record-and-tables-530o</link>
      <guid>https://dev.to/loganlampton/ruby-active-record-and-tables-530o</guid>
      <description>&lt;p&gt;Tables are great for sitting at and even better for organizing your data. Let's take a look at how to do one of the first tasks you'll want to do with Ruby, creating tables. We'll be backend experts in no time!&lt;/p&gt;

&lt;p&gt;A great way to create your initial tables/database in Ruby is Active Record, a Ruby gem creates a link between Ruby and databases. You can read more about &lt;a href="https://guides.rubyonrails.org/active_record_basics.html" rel="noopener noreferrer"&gt;Active Record basics&lt;/a&gt; on its official guide if you'd like, but no need to right now for this guide.&lt;/p&gt;

&lt;p&gt;Active Record is a Ruby gem, so an entire library of code that you can install by using this command in the terminal of your ruby project location: &lt;code&gt;gem install activerecord&lt;/code&gt; Alongside Active Record, we'll be using a tool command called 'rake' which you can install using the console command &lt;code&gt;gem install rake&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;One last bit of information up front: We'll start to make our database using something called migrations. A migration creates a schema Ruby file, that we can view that contains all of our data in our database and creates a new 'version' of the database with each migration we make. Active Record will create a db/schema.rb file after we create our first migration and update it to match the up-to-date structure of your database, ensuring that it is all set up correctly.&lt;/p&gt;

&lt;p&gt;Now comes the fun part! Let's make a database table for cats, since I found a free picture of a cat on a table for this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lciorm6vcysxvlxm8p3.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%2F5lciorm6vcysxvlxm8p3.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Reminder of a cat on a table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To start, within our Ruby project we'll run console commands to begin our two migrations. The command to create a migration is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle exec rake db:create_migration NAME=create_insertnames
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So in our case, it would be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle exec rake db:create_migration NAME=create_cats
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new Ruby Class file in our project. You'll notice that they have a long string of numbers that signify when the migration was created (which is useful for version control), followed by _create_cats. Awesome!&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%2Fh1mkgujvks17ljgtd35o.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%2Fh1mkgujvks17ljgtd35o.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within the file note how the class inherits from Active Migration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateCats &amp;lt; ActiveRecord::Migration[6.1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows us to run commands without having to code all of them within each file. It's a huge timesaver.&lt;/p&gt;

&lt;p&gt;Within our CreateCats class file, we'll want to create the framework for our table, which we can do, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateCats &amp;lt; ActiveRecord::Migration[6.1]
  def change
    create_table :cats do |t|
      t.string :name
      t.string :color
      t.integer :age
      t.string :type_of_table
    end
  end
end

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

&lt;/div&gt;



&lt;p&gt;This table would have 4 columns, one for the each cat's name, color, age and the type of table that they are on. Note how we label what kind of data will be in each cell of the table. Text is represented as string, with numbers represented as an integer. There are some other types you can research, but these are your two most common types. Note: be sure to add a new 'end' after you create your table!&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%2Fo9zq0zcnfe0ltq9fscda.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%2Fo9zq0zcnfe0ltq9fscda.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Frank, a cat on a table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now that you have the framework for your table, you can migrate it to update your schema with the command &lt;code&gt;bundle exec rake db:migrate&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your schema will now update to reflect your current table code and will continue to update itself to include any additional classes that you migrate, so you can create more tables and really get a database going!&lt;/p&gt;

&lt;p&gt;To view the table that we are creating, you can use the Visual Studio Code (VS Code) extension SQLite Explorer. This can be found in the extensions search within VS Code and once installed you can start it by clicking on your schema, then using the key command ctrl+shift+p. This will bring down a dropdown menu that will allow you to click on your file and open a new SQLite Explorer dropdown on the lower left-hand of your VS Code screen that you can click to find and open your table.&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%2F8o4vqesv41k1b3cxq8sk.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%2F8o4vqesv41k1b3cxq8sk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look at your cats table, you will see that it exits, but is blank:&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%2F0cy1nkbnufcc6yhrhyb3.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%2F0cy1nkbnufcc6yhrhyb3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's use the terminal to create some cats! To create Cat class objects, let's make one more Ruby file in the project called Cat.rb. It will also inherit ActiveRecord::Base like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Cat &amp;lt; ActiveRecord::Base
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr150knzibtk3524l7btp.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%2Fr150knzibtk3524l7btp.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Daphne, proud cat on a table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, let's make the Cat objects! Type &lt;code&gt;rake console&lt;/code&gt; in your terminal which opens a pry console where you can edit and test your Ruby code from within the terminal.&lt;/p&gt;

&lt;p&gt;Once you're in the pry session, create some new cat objects with the create method inherited from Active Record. For example: &lt;code&gt;Cat.create(name:"Frank", color: "black and white", age: 8, type_of_table: "oak")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After creating a few more cats we will end up with a table we can view in SQLite Explorer in VS Code that looks like this:&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%2Fe22w6tgox14ss8fhxqra.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%2Fe22w6tgox14ss8fhxqra.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Boom! We have a table of cats on tables! Keep coding and who knows what kinds of exciting databases full of cats (or other stuff, I guess, if you're into that) you can create. Good luck coding; I'm excited to see what you make.&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%2Fl6fut9153cnmhkudi7h3.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%2Fl6fut9153cnmhkudi7h3.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Igor, a cat jazzed to be a table&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Filtering in React</title>
      <dc:creator>logan-lampton</dc:creator>
      <pubDate>Tue, 13 Sep 2022 23:27:37 +0000</pubDate>
      <link>https://dev.to/loganlampton/filtering-in-react-5gbp</link>
      <guid>https://dev.to/loganlampton/filtering-in-react-5gbp</guid>
      <description>&lt;p&gt;React is a fantastic way to make your JavaScript code more reactive to the inputs from the user, and one of the best ways to dynamically re-render your page to help your users is to add a search bar that can filter the data on your webpage. &lt;/p&gt;

&lt;p&gt;Watch out, Google, whoever reads this will be able to make a super simple search bar (I hope)!&lt;/p&gt;

&lt;p&gt;Let's look at a simple example of a filter now. Say your very important bank client needs you to filter their database array of Dungeons &amp;amp; Dragons classes (a very realistic example and not just something that I was working on).&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%2Fmx6ilra2225gufbt4cip.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%2Fmx6ilra2225gufbt4cip.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see, we have a search bar and an array of images with names. We'll want to be able to type into the search bar and have the array objects update as we type to match the text as we type it.&lt;/p&gt;

&lt;p&gt;First, we'll need to set state in React. To do so, we'll need to import useState at the top of the page, like so:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ece6opqfp2dbeiptsn7.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%2F1ece6opqfp2dbeiptsn7.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You might also note that I imported useEffect, as well, which was part of the fetch() GET Request that I used to help populate the page with my array of data. We'll get to that in just a second! First, we'll want to use our useState, to declare the state that the page will begin at when it loads and allow us to re-render the page as the user interacts with it.&lt;/p&gt;

&lt;p&gt;All of the rest of our code is located in one function, which we'll just call App(). Within this function is we set the state for the array that we render on the page and the filtered version of the array. &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%2Fgd9u1js15l3b56d2pw9g.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%2Fgd9u1js15l3b56d2pw9g.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Note how both useStates are set to an empty array useState([]), as we want the page to begin as an array.&lt;/p&gt;

&lt;p&gt;We then call our fetch() GET request to get the information from the array. The final lines of the GET request assign the data to our state setting functions for the full array and our filtered array.&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%2Fuv3a9vdsxt0qpaab28js.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%2Fuv3a9vdsxt0qpaab28js.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
For bonus points, you can note how we used useEffect() to prevent our fetch() GET request from making infinite requests. We won't dwell on that here, just know that you'll be fine if you follow that syntax.&lt;/p&gt;

&lt;p&gt;Now that we have the array data, we can build the filter function!&lt;/p&gt;

&lt;p&gt;We'll write an if, else statement, where the first part is setting what the default of the page looks like. So if the search bar has an empty string "" (like when the page loads) we will return the full array by setting our filter state to the full array without any filter: SetFilter(classes)&lt;/p&gt;

&lt;p&gt;If it's not an empty string, then we will run the array through a filter that will look at that the user typed (our searchTerm variable).&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%2F5zca5x73q3pvlefj13a8.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%2F5zca5x73q3pvlefj13a8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But there are some problems with filter()! Filter only matches exact strings, so it won't match "Stupid" with "stupid", which is stupid. It also won't match parts of strings, like "You've gotta be kidding me" with "You've gotta be kidding m" &lt;/p&gt;

&lt;p&gt;To get around this, we add in the methods .toLowerCase() to make all the text typed lowercase, getting around the need to match cases. We also use .includes() so that what the user types also pulls up any partial matches in strings in the items in our array.&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%2Fekp6936x2ni8vdnarqp8.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%2Fekp6936x2ni8vdnarqp8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Please also note that in the filter() method we can't call the singular version of classes, classes, as that is a special word in JavaScript and must be avoided! I switched to "c", and now you can avoid my mistakes. My many mistakes.)&lt;/p&gt;

&lt;p&gt;If we want to search keys from our array besides our classes.name key, we can add in an "or" statement with || and add in a second key of classes, such as classes.role, like so and have a second set of strings that the user can search by. Nice!&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%2Fuwumemqe326bp7wd4qkl.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%2Fuwumemqe326bp7wd4qkl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to pass our filter variable and function as props to our component to hold the array and into a component where we will handle the user interacting with the filter bar. We're getting close to this working!&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%2Fw40njdpk0669ecawpo6m.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%2Fw40njdpk0669ecawpo6m.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the the Filter prop, we'll write the logic for capturing the strings that the user writes in the search bar and to make it reflect re-render the DOM as the user types the string.&lt;/p&gt;

&lt;p&gt;First, we'll set state to an empty string, as that is how the search bar will begin. We then write a function that sets the state of the search bar string to what the user writes and the state of the filtered array function to be the same.&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%2Fghyb6j08rxhhcckqcsoa.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%2Fghyb6j08rxhhcckqcsoa.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we can set the return of the Filter function to include an onChange event that is equal to the function we just set, so that it (and our filter!) fire off as the user types.&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%2F9qf16ixz69ylh2k8f92h.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%2F9qf16ixz69ylh2k8f92h.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Viola! We can now search to our hearts content! "Bar" returns "Barbarian" and "Bard"! "Support" returns "Artificer" and "Bard".&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%2F6qm03qbuwyzno3mk4wjw.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%2F6qm03qbuwyzno3mk4wjw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Filter to your hearts content for all the very important TTRPG-related activities in your life!&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>JavaScript GET Requests - Unlocking Using APIs</title>
      <dc:creator>logan-lampton</dc:creator>
      <pubDate>Tue, 23 Aug 2022 14:52:52 +0000</pubDate>
      <link>https://dev.to/loganlampton/javascript-get-requests-unlocking-using-apis-40d</link>
      <guid>https://dev.to/loganlampton/javascript-get-requests-unlocking-using-apis-40d</guid>
      <description>&lt;p&gt;If you're a beginner to software engineering, like myself, it's very exciting to unlock all the potential that comes with accessing APIs. APIs (short for Application Programming Interface) allow two applications to talk to each other, letting us input data from an API into our websites. There's APIs for all kinds of fun information, including Pokémon, Star Wars, even the Real Housewives of New Jersey. (All these topics are important to our work of course.) But how do we access them?&lt;/p&gt;

&lt;p&gt;Great question, me! To access APIs, we'll use a method in JavaScript called fetch().&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rwWKxoRX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4bgevw17jegkuevr52q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rwWKxoRX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4bgevw17jegkuevr52q.jpg" alt="Image description" width="880" height="418"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Mean Girls was wrong. Fetch is a thing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Fetch() &lt;u&gt;fetches&lt;/u&gt; a resource from the API we ask it to and returns a &lt;u&gt;promise&lt;/u&gt; which is fulfilled once the &lt;u&gt;response&lt;/u&gt; is available. I &lt;u&gt;promise&lt;/u&gt; you don't have to worry too much about what a promise is to do a GET fetch() request, so long as the method is called correctly. Just know that you can learn more about promises if you want to look at the other three ways that you can use fetch(). The simplest way to use fetch() is GET, which &lt;u&gt;gets&lt;/u&gt; the data from an API and we will examine now.&lt;/p&gt;

&lt;p&gt;But wait! To fetch() you need to use terminal to use a command to allow our computer to communicate with a server using the command: &lt;br&gt;
&lt;code&gt;json-server --watch db.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;JSON is a common data-interchange format used for APIs. For now, all we need to know is how to take that JSON data and return it in JavaScript, so that we can use it to populate API data in our webpages.&lt;/p&gt;

&lt;p&gt;Now that our computer can communicate with an API, we can use the  a fetch() request with GET to get the information on the API. To fetch() use the following syntax:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GKZsbpRo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mh4lbd7hsvpktnd0w6oe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GKZsbpRo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mh4lbd7hsvpktnd0w6oe.png" alt="Image description" width="880" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might notice that the fetch() code didn't actually include the word, "GET" that's because a fetch() request that doesn't ask for a different method will automatically do a GET request.&lt;/p&gt;

&lt;p&gt;Our particular use of the fetch() method would &lt;u&gt;fetch&lt;/u&gt; the data from the API at the URL we passed through the method. In this case, it would fetch all of the memes from a meme API. (Something all employers, no doubt use.) Our code then would convert the response (all the API data) from JSON format to JavaScript, using the JSON() method.&lt;/p&gt;

&lt;p&gt;The a sample of the JSON we are selecting would look like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xtzXuPWK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1dq4qmrfcmos04osxpfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xtzXuPWK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1dq4qmrfcmos04osxpfp.png" alt="Image description" width="880" height="1018"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see it has keys and values to provide us with details such as the name and url to images for memes. Now that we have used a GET request via fetch() we can add that data to our website to spice it up. We can populate our website with the values (names and images) from the API easily by selecting elements in our HTML to add the API details to by using methods such as document.querySelector() and changing the .innerText and .src of the elements of our HTML using Javascript. Like so:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uDUj8BGJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtnydjbzshwxd0g5ikmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uDUj8BGJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtnydjbzshwxd0g5ikmo.png" alt="Image description" width="880" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With some simple coding and a GET request we can very quickly add a lot of interesting data to our website, bringing it from this husk:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KnGS165m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cuqkbvtxnmjs41mqhoaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KnGS165m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cuqkbvtxnmjs41mqhoaw.png" alt="Image description" width="880" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To something full of information (and in our case memes!) that we can display however we would like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YEqO3nJY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kaetdaryb42vppdaxdv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YEqO3nJY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kaetdaryb42vppdaxdv.png" alt="Image description" width="880" height="726"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So look for free APIs today and use GET with fetch() to start building out websites full of information quickly! Now if you'll excuse me, I'm off to build that Pokémon, Star Wars, and Real Housewives of New Jersey website...&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
