With Hooks, Async Functions and best practices

Image for post
Image for post

Pre-requisites:

State is not an easy thing to manage on a React application: prop drilling, finding where a specific state variable is, re-rendering unnecessary components when using Context, etc.

Redux takes care of all this.

I advise you to write down this tutorial to learn it. I learned Redux by setting it up multiple times until it clicked. You get used to it :)

Redux

Redux is a state management tool that integrates very nicely with React. I highly recommend you use it with most of your projects. …


And why you should too

Image for post
Image for post

I used to dislike Redux a lot. The purpose of this article is to show you the reasons why I changed my mind, why I’m not using Context anymore, and why you should (almost) always use Redux.

1. Forced Best Practices

In React, the concept of state immutability is critical to create error free applications with predictable state changes. If you don’t know how to modify state without mutating it directly, you ought to learn how.

Redux forces you to use pure functions to update state without mutating it directly or, in Redux terms, Reducers. A reducer, in my own words, is like a pure setState() function with directions on what part of the state to modify. These directions are called Actions, which are simple objects that tell Reducers how to modify state. …


I combined my passions for finance, education and gaming and found a career.

Image for post
Image for post

I build things for a living. I’m a developer/educator/entrepreneur that’s been working on — and finally completed — a financial education game. It’s not easy, and I had to make some tough decisions, including learning how to code, scrapping a few prototypes, and backing away from a lucrative career while putting my savings on the line to pursue my dreams.

Goodbye Investment Banking

I knew that giving up investment banking would mean sacrificing some serious perks. …


Add payments to your web application today

Image for post
Image for post

Requirements:

The Purpose of This Article

I’m trying to make other people’s coding journeys easier than mine by making tutorials of what I’ve learned. I recently had to integrate payments to monetize my website, so hope you can use what I learned!

I learned how to code by building my financial education business. Check it out if you’re interested: www.snowballfinances.com.

Please send me an email at inaguirre96@gmail.com if you get stuck, or post in the comments below!

What You’ll Learn


We can decide what to believe.

Image for post
Image for post

“The Will to Truth, which is to tempt us to many a hazardous enterprise, the famous Truthfulness of which all philosophers have hitherto spoken with respect, what questions has this Will to Truth not laid before us! What strange, perplexing, questionable questions! It is already a long story; yet it seems as if it were hardly commenced. Is it any wonder if we at last grow distrustful, lose patience, and turn impatiently away?”

Friedrich Nietzsche — Beyond Good and Evil

Humans have forever attempted to find an absolute truth to guide their lives, but this truth seems to always be out of our reach. Sometimes good questions about life give it more sense than the answers we come up with. Nevertheless, we’re always stuck in uncertainty. I have a simple proposal on our quest to find meaning: What if uncertainty in itself is what generates meaning? If we had an absolute truth, wouldn’t that take away the point? …


How to Sign in with Google and use multiple Google APIs with JavaScript, Firebase, and React

Image for post
Image for post

Today I’ll show you an entire coding flow to use two popular Google APIs. From authenticating a user with specific scopes, getting a token back, and using that token to manipulate multiple APIs.

So far this is my most complex article, so please provide feedback! I’d love to help you have an easier time with this than I did, and I do answer individual questions if you get stuck (email me!).

This is also the tutorial I needed when building my own app. Some things aren’t simplified until you try and explain them yourself!

What you’ll learn


While making your own COVID-19 dashboard!

Image for post
Image for post

This is one of the topics I struggled the most while learning Javascript. I wanted to fetch data from multiple sources and use them together. I got all kinds of errors but eventually understood the process of handling async code in Javascript.

Today, after many (many…) mistakes, I’ve come up with a simple way of tackling this.

I thought fetching data from a coronavirus API might be appropriate for today’s situation. Maybe you can build great data tools for people to see!

I decided to make this tutorial in plain html/javascript . …


Image for post
Image for post

Simple stock fetching backend with Node.js and client calling examples.

I’ve had a fascination with the stock market from a very early age. Once I learned how to code, my combined interest in finance pushed me to create an online financial education company named Snowball Financial Education. I’ve used many tools to teach finance, and I wanted to share how I created a stock fetching tool to use real financial data in my games.

You can find my games at www.snowballfinances.com

I’ll be using the AlphaVantage API, which provides accurate stocks data.

Please get your free API key here: https://www.alphavantage.co/support/#api-key

Why create an API out of an API? …


1 CODE: IOS & ANDROID Google Login on Expo SDK 35.0.0

Image for post
Image for post
src: pixabay.com, wikimedia

Welcome! In this quick tutorial you’ll learn how to build Google login into a React Native application. Let’s get started.

Before starting: You need to know how to setup a React Native app with Expo and run it either on your phone or simulator. You can follow the App Setup below as well, but I recommend going over the documentation if you don’t know what Expo or React Native are.

One last thing. I learned how to code by building my business, Snowball Financial Education, teaching people finance in a fun way. You can find my life’s work in progress here: www.snowballfinances.com . …


Quick, in-depth tutorial.

Image for post
Image for post
https://cdn.pixabay.com/photo/2016/10/26/12/48/excel-1771393_1280.jpg

By Ignacio N. Aguirre

A couple of months ago I was trying to do CRUD operations on a Google Spreadsheet with the Sheets API V4 for my Javascript application. I was using React.js for the front end and Node.js for the backend: it very was painful. I had my google token on the backend, sent it to the frontend, but when I tried to access the API with React/Javascript, it wasn’t working! Finally, I figured out what you need to make it work, and how to expand on the API usage. …

About

Ignacio Nicolas Aguirre

Founder @ Snowball Financial Education www.snowballfinances.com | Javascript 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