Open in app

Sign In

Write

Sign In

Lawson Hung
Lawson Hung

15 Followers

Home

About

Jan 16, 2021

Swift: Class vs Struct

Classes and Structs are very similar to one another. They both store data and model behavior. Similarities They both define properties to store values. Much like a key-value pair in Hash Maps. They both have initializers to create instances with initial values. …

Swift

2 min read

Swift: Class vs Struct
Swift: Class vs Struct
Swift

2 min read


Oct 11, 2020

Confusing LeetCode

For the record, I was not able to solve this LeetCode problem. 682. Baseball Game You are keeping score for a baseball game with strange rules. The game consists of several rounds, where the scores of past rounds may affect future rounds’ scores. At the beginning of the game, you…

Flatiron School

2 min read

Flatiron School

2 min read


Oct 2, 2020

React Component Lifecycle

This was something I had learned before, but was struggling to really memorize so I thought I’d blog about it. React Lifecycle Methods diagram Fully interactive and accessible React Lifecycle Methods diagram.projects.wojtekmaj.pl I was just confused about when render would fire. As you can tell from the diagram, render fires before componentDidUpdate and componentDidMount. Render also fires when passed new props or the state is set again. This diagram is pretty helpful for me to understand when render is fired, so I know what to put in there. forceUpdate is something I heard I should not use unless absolutely necessary, which is basically almost never.

React

1 min read

React Component Lifecycle
React Component Lifecycle
React

1 min read


Sep 27, 2020

JavaScript 30–30 Day Challenge

JavaScript 30 Build 30 things with vanilla JS in 30 days with 30 tutorialsjavascript30.com JavaScript 30 is a 30 day challenge that pushes you to write code, perfect for beginners. I came upon this from my career coach, and found it super helpful. It teaches you how to write JavaScript and gives you a template to follow along with, along with a 1-to-1 solution of what’s in the video to follow along to. This is perfect for bootcamp grads who want to boost up their JavaScript.

JavaScript

1 min read

JavaScript

1 min read


Sep 19, 2020

React Components Rendering Twice in Development

This drove me nuts! I could not for the life of me figure out why my components were rendering twice. Marios however summed it up pretty well. My React components render twice and drive me crazy Many frontend developers who use modern React, have been pulling their hair out from time to time trying to figure out…mariosfakiolas.com He talks about why it renders twice, and the main reason is that React.StrictMode is trying to help you debug.

Flatiron School

1 min read

Flatiron School

1 min read


Sep 12, 2020

React Redux: Removing From an Array

Last week, I talked about how to add to an array in Redux. This week, to build upon and complement that, I’ll be talking about how to remove an item from an array. It’s not as easy as it may sound. …

Flatiron School

1 min read

Flatiron School

1 min read


Sep 6, 2020

React Redux: Adding to Arrays

Hey all! Another week for me as I complete a coding challenge sent by Shopify. This is my initial state: state={ title: '', resultCt: 0, searchResults: {}, nominations: [] } Here, I want to add to nominations which is initiated as an empty array. I tried state.nominations.push(action.nominations) which was my…

Flatiron School

1 min read

Flatiron School

1 min read


Aug 30, 2020

Leetcode: Jewels and Stones

This week is just a rundown on a Leetcode problem I went through. Jewels and Stones - LeetCode You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each…leetcode.com Here’s the solution: /** * @param {string} J * @param {string} S * @return {number} */ var numJewelsInStones = function(J, S) { let jewels = J.split(""); let stones = S.split("")…

Flatiron School

2 min read

Flatiron School

2 min read


Aug 22, 2020

Github Featured Readme

I found out recently that you can have a featured section in your Github. https://www.aboutmonica.com/blog/how-to-create-a-github-profile-readme For example, from Monica: To do this, it’s pretty simple. Just make a repository and make sure you name it exactly as your Github username, case sensitive. Github will tell you that this is a secret repository just for you! They’ll even give you some recommendations to start you off on the right foot.

Github

1 min read

Github Featured Readme
Github Featured Readme
Github

1 min read


Aug 16, 2020

Code Challenge

I had my first code challenge in a while from Codecademy. I’m pretty excited about this opportunity. I quickly opened the email from Codecademy, anticipating the chance to get to write some valuable code. They said that the code challenge should take a recommended 2–3 hours. Little did I know……

React

1 min read

React

1 min read

Lawson Hung

Lawson Hung

15 Followers

Software Engineer

Following
  • Dennis Basyrov

    Dennis Basyrov

  • Olga Rosas

    Olga Rosas

  • John Fajardo

    John Fajardo

  • Amritpal Singh

    Amritpal Singh

  • Aliciea Dawn Suechin

    Aliciea Dawn Suechin

See all (20)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech