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
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'], |
{ | |
"printWidth": 80, | |
"tabWidth": 2, | |
"useTabs": false, | |
"semi": true, | |
"singleQuote": true, | |
"trailingComma": "all" | |
} |
console.log('Thành đẹp trai') |
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"], |
I hereby claim:
To claim this, I am signing this object:
thanhmu010894
I hereby claim:
To claim this, I am signing this object: