Image for post
Image for post
Photo by Markus Spiske on Unsplash

With the release of React Hooks, many people may be wondering, what is the benefit of hooks anyway, or even what are hooks?

What are Hooks

Hooks are functions that allow you to “hook into” React state and lifecycle methods from within function components. An example of a “hook” is useState. useState is a hook that allows us to utilize stateful behavior from within a function component. We'll cover an example use of this built in hook in the next section.

Why Hooks

Hooks allow us to make all of our components function components. …

Part 1 in a series about cookies, LocalStorage, and SessionStorage in JavaScript

Image for post
Image for post
Photo by Mollie Sivaram on Unsplash

The internet is a wonderful place, it’s filled with useful information, pictures of cute animals, and all sorts of other great things. Sometimes, we want to interact with these things, maybe create an account on a website.

Unfortunately, the protocol that the web is built on, HTTP (Hyper Text Transfer Protocol), is inherently stateless.

What does it mean that HTTP is stateless? Well, in HTTP, each command is executed independently, without any knowledge of the commands that came before it. So, how do we then create interactive sites that remember users and their actions?

What Are Cookies Anyway?

  • A cookie is a small piece of information sent by a website, which is stored on a user’s computer. …

Learn clever uses of cookies and reduce reliance on performance-impacting scripts

Image for post
Image for post
Photo by Christian Holzinger on Unsplash

Ruby on Rails is fantastic for easily creating a powerful and flexible back end. With the popularity and flexibility of JavaScript, Ruby is not often used to create a front end. However, I argue that limiting yourself to HTML, Ruby, and CSS can help developers to learn to build better websites overall. By testing how far we can push the dynamism of our web pages without JavaScript, we can learn clever uses of cookies and reduce reliance on performance-impacting scripts.

A good way to practice using cookies with Rails is to create a simple search and sort function for a website. …

7 steps to developing an algorithmic approach to Googling your errors

Image for post
Image for post
Photo by Max Chen on Unsplash

Often, as developers we find ourselves running into an error that is more confusing than helpful. When we turn to Google to help us, we can easily end up with hundreds of thousands of search results for a single search.

Learning how to properly navigate through these many results can make a developer’s life significantly easier.

1. Start With a Very Specific Search Term

We’ll use a simple error as an example:

Your best bet is most likely going to be to copy the important parts of that error into a search and maybe add a few key terms related to what you are trying to accomplish.

So, now we can take that error message and our extra search terms and throw them into Google, looking something like…

Sukrit Walia

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