Open in app

Sign In

Write

Sign In

Huy Trinh
Huy Trinh

75 Followers

Home

About

Jun 18, 2021

Prettier and ESLint Automation Cheat Sheet

Why 👉 Preventing you from committing bad code. This is the cheapest thing you can do to make sure your code is valid Setup Prettier Eslint StyleLint Ability to validate code locally Automatically run code validation with Husky and lint-staged 🛠 1. Prettier Make the code styling of the project more consistent Stop argument about…

React

4 min read

Prettier and ESLint Automation Cheat Sheet
Prettier and ESLint Automation Cheat Sheet
React

4 min read


Published in JavaScript in Plain English

·May 22, 2021

10 Tips to Improve Readability in JavaScript

1. Log level and semantic methods 📚 Console docs console.log("hello world") console.warn("this is a warning") console.error("this is an error") console.info("this is info") console.debug("this is debug") console.trace("show trace") If you try the console.warn, you will get the trace which means that it is easier to debug the code. Let’s try other console functions yourself. ⚠️ Original code …

Java Script

6 min read

10 Tips to Improve Readability in JavaScript
10 Tips to Improve Readability in JavaScript
Java Script

6 min read


Oct 24, 2020

What you may not know about the Error Boundary

I believe that you might know about Error Boundaries BUT do you know how to recover a component from an error? 😌 Do you know how to survive through the pandemic?

Reactjs

7 min read

What you may not know about the Error Boundary
What you may not know about the Error Boundary
Reactjs

7 min read


Jan 10, 2020

Immer — Javascript Immutability the happy way

Prerequisite: Basic knowledge about React and Immutability in Javascript In this post, I am going to talk about Immer, a library that makes immutability in Javascript way easier and simpler. I assume that you already know why we need immutability. If you don’t, no worries, check this blog first 😍 …

Immer

7 min read

Immer — Javascript Immutability the happy way
Immer — Javascript Immutability the happy way
Immer

7 min read


Nov 11, 2019

Introduction to React.memo, useMemo and useCallback

Prerequisite: Basic knowledge about React When I start to write this blog, I ask myself whether I should only talk about the differences between useMemo and useCallback because they are React Hooks while React.memo is not. Eventually, I decided to include React.memo as well since on the one hand the…

React

6 min read

Introduction to React.memo, useMemo and useCallback
Introduction to React.memo, useMemo and useCallback
React

6 min read


Published in Shot code

·Sep 11, 2019

Introduction to useRef Hook

Prerequisite: Basic knowledge about React and Refs and the dom in React This post is going to talk about what is useRef hook and when we can use it. If you wonder why you should use Hooks, Why React Hooks Part I and Part…

React

6 min read

Introduction to useRef Hook
Introduction to useRef Hook
React

6 min read


Sep 3, 2019

Why React Hooks (Part II: Reusable code)

Prerequisite: Basic knowledge about React This article is intended to give you an understanding of how React Hooks helps us to share common logic between components and what differences between using Hooks and other methods. Take a look if you have not read the Part I: Complicated lifecycles You spent…

React

6 min read

Why react hooks — Part II
Why react hooks — Part II
React

6 min read


Aug 26, 2019

Why React Hooks (Part I: Complicated lifecycles)

Prerequisite: Basic knowledge about React In this post, we are going to talk about one in a million reasons why we should all start to learn and use Hooks even though fishing is not our hobby 🐟 🎣. If you have never tried Hooks or heard of it before, stay…

React

6 min read

Why react hooks — part I
Why react hooks — part I
React

6 min read

Huy Trinh

Huy Trinh

75 Followers

Software developer at Aiven

Following
  • Dave Smith

    Dave Smith

  • Sascha Wolff

    Sascha Wolff

  • Daniel Tartaglia

    Daniel Tartaglia

  • Benjamin Hardy, PhD

    Benjamin Hardy, PhD

  • Won Seob Seo

    Won Seob Seo

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech