Part 1 of a Series of Blogs on Hooks

Photo by Joshua Reddekopp on Unsplash


As we know, one of the most important part of React is managing state. Before hooks were introduced the only way to modify state was with class components and this.state. As of React v.16.8, Hooks let you use state and other React features without writing a class. For this blog we’ll focus on useState. It’s similar to this.setState in a class, except it doesn’t merge the old and new state together. There are some important things to note before using hooks.

A quick rundown..

Photo by Pankaj Patel on Unsplash

What is React?

Before getting into the virtual DOM we must first know about React. Unless you’ve been living under a rock, React is one of the most popular frameworks in the web development world. React was created originally at Facebook and has enjoyed solid growth since its inception.

If you are using Javascript you’ve likely heard of the DOM (Document Object Model) before. Today we’ll talk about the differences between the real DOM and the Virtual DOM and how things work.

Real DOM

In layman’s terms the DOM represents the UI of your application. It’s a programming interface for HTML and…

If you didn’t know..

1. Airbnb

Photo by Filios Sazeides on Unsplash

We all know Airbnb as the app that connects travelers and those that want to rent homes and apartments. Would you believe it was built on Ruby on Rails? The company was founded in 2008 in San Francisco, California .It currently covers more than 100,000 cities and 220 countries worldwide.

While Ruby is still a huge part of Airbnb they also use other languages and frameworks such as Javascript, React, Node.js, etc.

2. Codecademy

Photo by Tianyi Ma on Unsplash


We’ve all been there. Wasting copious amounts of time setting up the seemingly endless rails files just to find out something is terribly wrong. Now introducing the scaffold command. Once you’re in the correct directory you can slap this command into your terminal:

rails g scaffold name_of_file attribute1 attribute2 attribute3
  • Models
  • Routes
  • Test-related files
  • Filled out views(including forms)

Coding tips that improve your daily life

Like many others I had lost my job during the 2020 pandemic. I had been working a career that I was no longer passionate about and looking for something to spark my fancy. After extensive research I noticed a trend that all the qualities of a career I wanted was in one thing…programming. That is when the seeds of interest were sowed and I began looking into a career in coding.

Fast forward a month later, I’m starting my first day at Flatiron’s Software Engineering course. Little did I know that something seemingly…

Devante Lowery

Coding Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store