This is an updated version of my past blog post, How to Implement Redux in A React Application, that now uses hooks, specifically useSelector and useDispatch. Feel free to poke around with this sample code.

Photo by Jan Antonin Kolar on Unsplash

Let’s get organized! There are many great tutorials that break down the concepts behind Redux or give a nice overview of how everything’s connected, but the fact is, Redux has a lot of starter code that is difficult to set up for the first time. If you understand the basics of Redux, here are some easy steps for initial setup in your React app.

Note…


Photo by Emma Matthews Digital Content Production on Unsplash

During my job search, I’ve been publishing at least one blog per week. After reading many sample blogs and creating my own, I’ve come up with four basic things that you can do to make your blog posts pop. In addition to having great content, it’s important to have eye-catching images and demos to ensure your blogs are read.

ADD AN IMAGE
Underneath your title, upload your own image or use a stock image from Unsplash, which are available directly through Medium. When you click on the plus sign to add a new section, choose the search icon (instead of the…


Photo by Joshua Sortino on Unsplash

So you’re interested in learning Python. One of the first things to learn about are the four built-in data structures. Check out the examples below for a quick overview!

  1. LISTS
    Example:
    l = [1, 2, “a”]
    Contents: ordered sequence of objects
    Mutable/Immutable: mutable — can add or remove elements
    Similar to: array
    Built with: enclosed with brackets
  2. TUPLES
    Example:
    tup = (1, 2, “a”)
    Contents: ordered sequence of objects
    Mutable/Immutable: immutable — cannot add or remove elements
    Similar to: array
    Built with: enclosed with parentheses(optional)
    Note: Faster and consumes less memory that lists
  3. DICTIONARIES
    Example:
    dict = {“a”:1, “b”:2}
    Contents: unordered; have…

Photo by Isaac Smith on Unsplash

Recently, some colleagues and I wanted to make a web application that modeled various types of Covid data. We found the Covid Tracking Project API and decided we wanted a way to show general predictions on a state and country level. Without being data scientists, we knew one straightforward way to do this would be through implementing linear/exponential regressions.

So what’s a linear regression? It’s the line of best fit. What does that mean? I’m glad you asked!

The goal with finding the line of best fit is to find the equation of a line that best represents a set…


Photo by Harpal Singh on Unsplash

Something that I learned pretty early on in my coding career is this: even if your app has amazing functionality, if it doesn’t look good, it will be overshadowed by better-looking apps. First impressions are important, and that carries over to your projects.

If you’re working with React, Material-UI is a powerful styling library. Even if you haven’t worked with Material-UI before, you’ll likely recognize a lot of the icons and components, as Material Design was developed by Google in 2014. After installing the library, you have access to a variety of components that you can import and adjust as…


Pong

This blog picks up where my previous blog post, Game Design: Intro to Vector Projections Part I, left off.

In the last blog post, we reviewed vector basics and ended with how to find a vector projection. So how do we tie this together and find the direction of our bouncing ball using vectors?

FINAL STEPS: FIND VECTOR REFLECTION


Bounce Around

These days, we take a lot of things for granted. In terms of website design, we expect pages to look a certain way, and we forget that there is a lot of code behind simple functionality. For games, we expect game components to react a certain way (eh, eh, see what I did there?) that reflect what would happen in the natural world. We expect a character to be able to jump and fall, a ball to bounce in a predictable direction, sound to be softer or louder depending on where we are in relation to something else, etc…

In…


Eastman Kodak Hall | Stock photo from Unsplash

Classical music and software engineering — what do they have in common?

I’m a musician, and I’m a full-stack developer. I recently graduated from the Flatiron School, and as I reflect on my own path as I begin the process of applying to engineering positions, I’ve thought about this question in depth. On the surface, these may seem like two very different fields, but there is a lot of overlap between what makes a great musician and what makes a great coder.

If you’re a musician, you’ve probably heard the phrase “Anyone can learn to play an instrument.” If you’re…


Along with my other blog on the basic setup of Redux, Redux with Hooks: Basic Setup, I thought it would be helpful to write out the steps to adding Thunk to your React-Redux application. Feel free to check out the sample code!

Step 1: Run npm install redux-thunk.

What is Thunk? Basically, it’s middleware that checks to see if an action is returning a function instead of the normal JavaScript plain object. If that’s the case, it will catch the action before it reaches the reducer and invoke the function (which often returns another action to be passed on to…


Unless you are specifically interested in mapStateToProps and mapDispatchToProps, please check out the updated version of this blog, Redux with Hooks: Basic Setup, that incorporates useSelector and useDispatch.

There are many great tutorials that break down the concepts behind Redux or give a nice overview of how everything’s connected, but the fact is, Redux has a lot of starter code that is difficult to set up for the first time. If you understand the basics of Redux, here are some easy steps for initial setup in your React app.

Note: One of the most confusing things about Redux is that…

Lauren Yu

Software engineer/full-stack developer and founding member of the Breaking Winds Bassoon Quartet.

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