---
title: "Quan Nguyen (@quanng) | Hashnode"
description: "Human learning. Read the latest articles by Quan Nguyen on Hashnode."
url: "https://hashnode.com/@quanng"
---

@quanng

# Quan Nguyen

@quanng · Joined November 2020

Human learning

### [\`useState\` and \`prevState\`](https://quan-ng.hashnode.dev/usestate-and-prevstate?utm_source=hashnode&utm_medium=feed)

There's a way to update your React state more efficiently using the prevState with a callback in setState function. const \[name, setName\] = useState(''); const \[address, setAddress\] = useState(''); const \[phone, setPhone\] = useState(''); // we have ...

1 min read · [quan-ng.hashnode.dev](https://quan-ng.hashnode.dev/usestate-and-prevstate?utm_source=hashnode&utm_medium=feed)

[Mar 10, 2023](https://hashnode.com/posts/usestate-and-prevstate/640ab40907ae26b9361e746b)

### [My quick note on Redux](https://quan-ng.hashnode.dev/my-quick-note-on-redux?utm_source=hashnode&utm_medium=feed)

Redux is a state management library that helps us to solve the problem of state usage from many places in app and passing props to a deep nesting component. Redux ensures 3 pillars in its pattern: 1-way binding data & single source of truth & immutab...

2 min read · [quan-ng.hashnode.dev](https://quan-ng.hashnode.dev/my-quick-note-on-redux?utm_source=hashnode&utm_medium=feed)

[Feb 25, 2023](https://hashnode.com/posts/my-quick-note-on-redux/63fa449cf9acd627f585c4a0)

### [Currying in Javascript](https://quan-ng.hashnode.dev/currying-in-javascript?utm_source=hashnode&utm_medium=feed)

Currying in Javascript It can be understood as function caching. Consider the snippet below: // utils.js const submitForm = (formName: string) => (submittedFormData) => { const currentForm = getForm(formName); return submit = () => { ...

1 min read · [quan-ng.hashnode.dev](https://quan-ng.hashnode.dev/currying-in-javascript?utm_source=hashnode&utm_medium=feed)

[Nov 20, 2022](https://hashnode.com/posts/currying-in-javascript/6379cdfce1849d46f5832d1b)

### [Lazy Initialization in React](https://quan-ng.hashnode.dev/lazy-initialization-in-react?utm_source=hashnode&utm_medium=feed)

I read about lazy init lately when enrolled in FrontendMaster course from Brian Holt. It is said that lazy init is used when you want to perform some heavy calculation actions rather than primitive values in the useState hook. For example calculating...

1 min read · [quan-ng.hashnode.dev](https://quan-ng.hashnode.dev/lazy-initialization-in-react?utm_source=hashnode&utm_medium=feed)

[Oct 23, 2022](https://hashnode.com/posts/lazy-initialization-in-react/63551861c27250bea241fb83)

### [Prevent unnecessary re-render with React composition](https://quan-ng.hashnode.dev/prevent-unnecessary-re-render-with-react-composition?utm_source=hashnode&utm_medium=feed)

React encourages people to use special prop children for the container which has unknown children components. For example, Sidebar or Dialog. And avoid component inheritance as much as you can. React doc says it. Especially, component composition hel...

2 min read · [quan-ng.hashnode.dev](https://quan-ng.hashnode.dev/prevent-unnecessary-re-render-with-react-composition?utm_source=hashnode&utm_medium=feed)

[Sep 24, 2022](https://hashnode.com/posts/prevent-unnecessary-re-render-with-react-composition/632e95653ac18d0d78a01323)
