Skip to content

Instantly share code, notes, and snippets.

View thanhmu's full-sized avatar
🏠
Working from home

Nguyễn Trung Thành thanhmu

🏠
Working from home
View GitHub Profile
@thanhmu
thanhmu / event-loop.md
Created April 27, 2022 01:23 — forked from gokulkrishh/event-loop.md
Event Loop and Call Stack

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@thanhmu
thanhmu / .eslintrc.js
Created September 14, 2020 04:30
.eslintrc.js
const fs = require('fs');
const path = require('path');
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
@thanhmu
thanhmu / .prettierrc
Created September 14, 2020 04:29
.prettierrc
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
console.log('Thành đẹp trai')
@thanhmu
thanhmu / demo.js
Last active October 1, 2019 02:48
class ProductGrid extends React.Component {
 state = {
   data: []
 };
 handleData = data => {
   const newState = this.state.data;
   if (data.code === 200) {
     data.data.list.forEach(function(productParam) {
       newState.push({
         _id: productParam["dim_product.id"],

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@thanhmu
thanhmu / keybase.md
Created September 11, 2019 09:20
keybase

thanhmu010894

Keybase proof

I hereby claim:

To claim this, I am signing this object: