Learning of React framework

What is React? React is a declarative, efficient, and flexible JavaScript library for building user interfaces 1, Environment construction Use create React app to quickly build React development environment Create React app is from Facebook. With this command, we can quickly build the React development environment without config ...

Added by CleoK on Wed, 05 Jan 2022 03:49:28 +0200

React series - Jsx, composite events and Refs

The birth of JSXReact uses JSX instead of regular JavaScript.JSX is a JavaScript syntax extension that looks much like XML.We don't have to use JSX, but it has the following advantages:JSX executes faster because it is optimized after compiling into JavaScript code.It is type safe and errors can be found during compilation.Writing templates usi ...

Added by lihman on Wed, 05 Jan 2022 02:42:59 +0200

Concept understanding and application scenarios of anti chattering and throttling in js

Concept understanding and application scenarios of anti chattering and throttling in js Anti shake During development, if you need to listen to high-frequency events such as scroll bar scrolling events or input events in the input box, if you trigger specific operations every time, the browser will become stuck and affect the user experience. ...

Added by CheesierAngel on Wed, 05 Jan 2022 01:35:01 +0200

Vue3 - kick off setup

Compare vue2 0, Vue3 is most different in that data() becomes setup() setup is a new configuration item in Vue3. The value is a function The data and methods used in the component shall be configured in setup There are two return values of the setup function: 1. If you want to return an object, the properties, methods and in the object can ...

Added by ashwood on Tue, 04 Jan 2022 23:06:45 +0200

TS react: sort the types commonly used in react

React. There are some problems with FC annotation. There is some controversy on whether to use this type as annotation first, because this type destroys JSX Librarymanagedattributes, which causes it to ignore parameters such as defaultsProps and displayName of function and class components, See details In addition, it cannot return the children ...

Added by jpschwartz on Tue, 04 Jan 2022 21:09:16 +0200

Intensive reading of Records & Tuples for React

Following the previous article Intensive reading of records & tuples proposal , some people have been thinking about what problems this proposal can help React solve, such as this article Records & Tuples for React , it was mentioned that many React pain points can be solved.In fact, I'm worried about whether the browser can optimize th ...

Added by Unforgiven on Tue, 04 Jan 2022 19:38:38 +0200

An article takes you easy to get started

I Introduction to JavaScript (1) Why learn JavaScript. A. HTML+CSS can only have static pages, but there is no dynamic effect. B. JS can verify form data. C. Switch TAB menu. D. Switching of background pictures. E. JS game development. (2) JS concept Literal translation: without compilation, the browser kernel can directly interpret and exe ...

Added by sONOCOOLO on Tue, 04 Jan 2022 17:27:30 +0200

Explain the diff algorithm of vue in detail

Explain the diff algorithm of vue in detail 1. How does vue update nodes when data changes? You should know that rendering a real dom costs a lot. For example, sometimes when we modify some data, if we directly render it to the real dom, it will cause the redrawing and rearrangement of the whole dom tree. Is it possible that we only update th ...

Added by tserbis on Tue, 04 Jan 2022 16:57:10 +0200

Some questions and interview questions about native js

Scope and Scope Chain in js There are two types of scopes in javascript Local Scope: They can only be accessed within a functionGlobal scope: All scripts and functions of a Web page can access it. javascrip has a function scope: each function can create a new scope. Scope Chain When looking for a variable, it looks for it from the variable ...

Added by noobstar on Tue, 04 Jan 2022 15:25:29 +0200

Practice and principle of Vue dynamic component

Our company has a workbench building product, which allows you to build a workbench page by dragging widgets. The platform has built-in some common widgets. In addition, it also allows you to upload and use self-developed widgets. This paper will introduce its implementation principle from the perspective of practice.ps. this project was create ...

Added by llama on Tue, 04 Jan 2022 15:04:42 +0200