Image for post
Image for post
Photo by Rich Tervet on Unsplash

Maybe you’ve been using JavaScript for a while and you’ve been hearing the buzz around… TypeScript. In this 2 part series, we’ll take a look at Why TypeScript? and Why Not TypeScript?

What is TypeScript?

According to the TypeScript website “TypeScript extends JavaScript by adding Types… TypeScript code is transformed into JavaScript code via the TypeScript compiler or Babel. This JavaScript is clean, simple code which runs anywhere JavaScript runs…”. In short, many refer to TypeScript as a superset of JavaScript.

In my opinion, this is kind of true and kind of not. Technically, not all valid JavaScript code can also be TypeScript…


Image for post
Image for post
Photo by Mia Baker on Unsplash

When COVID19 hit, I, like many others, shifted from working in the office to working from home. This transition was a little difficult. But, nonetheless, I was thankful to have a job in this crazy time. Here are some tips that helped me adjust to working from home.

1. Morning Routine

I know what you’re thinking. “Please, not another spiel on a morning routine.” But, hear me out! It can be helpful. When I first started working from home, I would wake up around 8am, shower and get ready, make a cup of coffee, and start work by 8:30 or 8:45.

If this…


The ability to mutate arrays in JavaScript is a must in your JS toolbox. Let’s take a look at a few methods.

Image for post
Image for post
Photo by Artem Sapegin on Unsplash

push()

Let’s look at the following array.

var numbers = [0, 3, 6, 9, 12];

numbers is an array that contains numbers increasing by 3. What if we wanted to add the next number in the sequence at the end? We can use the push() method to do this.

numbers.push(15);// result - numbers = [0, 3, 6, 9, 12, 15]

push() can be an extremely helpful tool when the final size of an array is unknown and a value needs to be added.

pop()

Contrary to push(), pop() removes the value at the end of an array. Let’s take a look…


Hi and welcome back to part 2 of the React context API series. For part one, we talked about how to leverage React’s context API to pass state values to child components. Now, in part 2, we’re gonna look at how do we update the state through Consumers?

Image for post
Image for post
Photo by Émile Perron on Unsplash

The repo for this project can be found here.

If you want to learn more about what context is I highly suggest reading my first post. I explain a little more about why context is useful as well.

What you will make

Let’s take a look at what you’ll make. Check out the picture below.


So, you’ve heard about React’s context API but are scared to approach it because of the complexity of Redux. Well, my friend, this is a simple tutorial to get you started with the beauty that is context.

Image for post
Image for post
Photo by Oskar Yildiz on Unsplash

What is context?

React’s context API was built to make passing data to components easier. This could be done by a method called prop drilling. Here is a really good article about prop drilling by Kent C. Dodds. Prop drilling is still a good method, but, it is not very practical for a larger application.

Many have also turned to a tool called Redux. Redux is awesome and the implementation is very similar to how you would use context. Unfortunately, the learning curve is pretty steep and, for most applications, Redux is just overkill.

So, back to what is context? Context lets state…


Howdy! And welcome to my tech and life blog — TechFlip. This is my first post. I decided to start this blog for many reasons. Here’s a few.

Image for post
Image for post
Photo by Andrew Neel on Unsplash

Why did I start?

A New Challenge. I spend a lot of time writing code. I currently am a Software Engineer Intern in Austin, Texas. I also am still a student at Texas A&M University (Whoop!). I have noticed that my time within my job or school work is focused on engineering and designing. So, I figured I’d venture into an untapped space for myself.

Blogs have helped me. I am an aspiring software engineer, however…

Alex Valdez

Jesus follower, Husband, tech enthusiast, GoldenDoodle Dad, coffee lover, software developer.

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