Build react+typescript+antd project from scratch

Step 1: create a project through create react app npx create-react-app ai_video_project_frontend --template typescript When you open the project in vscode, you can see that the react project is successfully generated and the suffix of the component is tsx. At this time, it indicates that the prototype of react+typescript project is succ ...

Added by seran128 on Mon, 03 Jan 2022 08:58:54 +0200

react source code analysis 12 Status update process

react source code analysis 12 Status update processVideo Explanation (efficient learning): Enter learningsetState&forceUpdateSeveral ways to trigger status update in react:ReactDOM.renderthis.setStatethis.forceUpdateuseStateuseReducerLet's focus on this Setstate and this Forceupdate, hook is discussed in Chapter 13this. Call this in setstat ...

Added by agriz on Mon, 03 Jan 2022 01:19:45 +0200

Basic configuration of react router and mobx

Routing configuration 1. Import package yarn add react-router-dom; PS: React router and react router DOM react-router: The core function of routing is realized. react-router-dom: be based on react-router,Added some functions in the browser running environment. react-router-dom yes react-router An enhanced version of Because React Nativ ...

Added by saish on Sun, 02 Jan 2022 23:21:47 +0200

[React basic series] controlled form vs uncontrolled form

The previous learning section introduced the use of some form contents - the previous cases basically used input. Next, learn the difference between controlled forms and uncontrolled forms, and learn the knowledge points of uncontrolled components through uncontrolled forms. Controlled forms refer to forms whose states are managed by React ...

Added by D_tunisia on Sun, 02 Jan 2022 06:23:27 +0200

Front end usage function: the front end directly requests the back-end stream to download files

Recently, the project encountered a small requirement that the file name is provided by the back end when the front end downloads a file (it turned out that the front end writes the file name dead). Our project architecture is SpringBoot+React (TypeScript). I looked at the back-end code and inserted the file name into the header of the response ...

Added by cytech on Sun, 02 Jan 2022 03:10:13 +0200

react source code analysis 17 context

react source code analysis 17 context Video Explanation (efficient learning): Enter learning context flowchart cursor/valueStack In the react source code, there is a valueStack and valueCursor to record the historical information of the context and the current context, and a didperformworkstack cursor to indicate whether the current context h ...

Added by pkedpker on Sat, 01 Jan 2022 13:06:14 +0200

react source code analysis 10 Commit phase

react source code analysis 10 Commit phaseVideo Explanation (efficient learning): Enter learningPrevious articles:1. Introduction and interview questions2. Design concept of react3.react source code architecture4. Source directory structure and debugging5. JSX & Core api6.legacy and concurrent mode entry functions7.Fiber architecture8.rende ...

Added by matscott on Fri, 31 Dec 2021 05:42:32 +0200

React. Usage of memo, useMemo and useCallback

React. Usage of memo, useMemo and useCallback these three API s are usually used when optimizing components, and their principle is similar to the caching mechanism of vue's calculation attributes. The dependencies have not changed, and the results obtained before will not be executed in the function; It can also be said that it is based on the ...

Added by jesse26 on Fri, 31 Dec 2021 00:22:36 +0200

React implements the basic application of todolist and components

Implement the basic ToDolist with react The last time I learned how to build a basic react framework, today I'll try to write a ToDolist to exercise my logic ability First, we should build a basic framework and fill in two sets of default data import React, { Component } from 'react'; class App extends Component { constructor(props) { ...

Added by frost on Thu, 30 Dec 2021 23:49:00 +0200

With React hooks, you can spend more time fishing

🎙️ preface According to legend, react 17 has a very powerful function, that is, react hooks. In fact, react hooks is a bit similar to vue3's composition API. They all appear to improve development efficiency. Then, in the following article, we will start from 0 to 1 to show you about react hooks and some common API s. No more nonsense, ...

Added by mr_griff on Thu, 30 Dec 2021 12:31:36 +0200