promise and async/await parsing

Problem introduction What is hell The case of nested callback functions in callback functions is called callback hell. Callback hell is an operation that occurs to realize the sequential execution of code. example setTimeout(()=>{ console.log('This is the first step') setTimeout(()=>{ console.log('This is the secon ...

Posted by keyont on Thu, 17 Feb 2022 16:30:03 +0100

[front end development] talk about the let and const commands in the core foundation of ES6

ECMAScript 6 Introduction ECMAScript 6.0 (ES6 for short) is the next generation standard of JavaScript language, which has been officially released in June 2015. Its goal is to make JavaScript language can be used to write complex large-scale applications and become an enterprise development language. Over the past few years, the latest ...

Posted by complex05 on Thu, 17 Feb 2022 14:32:10 +0100

Code structure and overall logic of vue source code series 2

directory structure dist packaged vue versionflow type detection, typeScript changed in 3.0script build related configurations of different versions of vuesrc source code Compiler compiler Core does not distinguish the core code of the platform Global API global API Constructor and prototype method of instance observer data response util ...

Posted by Baving on Thu, 17 Feb 2022 14:26:36 +0100

Chapter 2 Introduction to JavaScript basics 2

(3) Variables let and var Previously, we learned that the var keyword is used to declare and create a variable. Generally, we use var to create global variables and let to create local variables. Examples are as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-C ...

Posted by A584537 on Thu, 17 Feb 2022 13:28:37 +0100

Front end knowledge points

1. De duplication of the same object in the array The reduce() method receives a function as an accumulator. Each value in the array is reduced from left to right and finally calculated as a value Syntax: array.reduce(function(total, currentValue, currentIndex, arr), initialValue) let arr = [{id:1},{id:2},{id:3},{id:1}] const hash = {} arr ...

Posted by kendall on Thu, 17 Feb 2022 09:02:22 +0100

Learning notes of javascript advanced programming | 8.2 create object

follow [front end Xiaoao] , read more original technical articles create object Create a single Object: Object constructor and Object literalDisadvantages: using one interface to create many objects produces a lot of duplicate code Relevant code → Factory mode Create a specific interface according to a specific object creation proce ...

Posted by purencool on Thu, 17 Feb 2022 08:28:28 +0100

React source code analysis series - render exception handling mechanism of react

Series article directory (synchronous update)React source code analysis series - render phase of react (I): introduction to the basic processReact source code analysis series - render phase of react (II): beginWorkReact source code analysis series - render phase of react (III): completeUnitOfWorkReact source code analysis series - render except ...

Posted by Eamonn on Thu, 17 Feb 2022 03:42:42 +0100

prop verification in vue

Prop 1 . prop case Vue.component('blog-post', { // camelCase in JavaScript props: ['postTitle'], template: '<h3>{{ postTitle }}</h3>' }) <!-- In parent component kebab-case of --> <blog-post post-title="hello!"></blog-post> 1234567 2 . Single data flow All props form a one-way downstream binding between their p ...

Posted by rage123456 on Thu, 17 Feb 2022 01:03:18 +0100

From how to use to how to implement a Promise

prefaceIn this article, we will learn how to use Promise and how to implement our own Promise. The explanation is very clear. It will be implemented step by step in the whole process, with detailed notes and principle explanation.If you think this article is helpful to you, ❤️ Follow + like ❤️ Encourage the author, the official account, the fir ...

Posted by boneXXX on Wed, 16 Feb 2022 08:05:07 +0100

"webpack5 actual combat 4" - loader

Preface: the project has been packaged with webpack, and has systematically followed the video tutorial of station B, but I always feel that there is something wrong. Some configurations are still unknown. I decided to write down some examples, summarize the knowledge points, and learn webpack 5 by the way. webpack actual combat series column ...

Posted by daucoin on Wed, 16 Feb 2022 01:51:26 +0100