React -- props of the three cores of component instances

2. props When we need to transfer external data to the component, we need to use the props attribute of the component instance. Because state is internal to the component. You cannot use state to directly receive data only after the component is created, such as the data requested back. Transfer label properties The data passed to props is ...

Posted by ericbangug on Fri, 24 Dec 2021 22:30:14 +0100

2022 front end required โญ Regular Daquan, please ๐Ÿš€ Put it away in advance

Hello, I'm the author of any rule (a vscode plug-in). Thank you for your long-term love for any rule After more than one year's use, the background of any rule has been logged with 10w +. At the end of the year, please share your favorite regularities in this yearhttps://github.com/any86/any-...๐Ÿ”ฅ Regular TOP10As expected, the most commonly use ...

Posted by slicer123 on Fri, 24 Dec 2021 18:04:40 +0100

React learning notes -- the difference between the setState of Function components and Class components

I think we all know the similarities and differences between Function components and Class components in React, such as: 1. Same point Whether a component is declared using a function or class, it must not modify its own propsAll React components must be pure functions, and it is forbidden to modify their own propsReact is a single data flow. ...

Posted by Whitestripes9805 on Wed, 22 Dec 2021 09:28:29 +0100

Introduction and application of redux in react

1 what is Redux 1. redux is a js library dedicated to state management (not a react plug-in library). 2. It can be used in react, angular, vue and other projects, but it is basically used in conjunction with react. 3. Function: centrally manage the shared state of multiple components in react application. 4. redux is only responsible for ma ...

Posted by taiger on Tue, 21 Dec 2021 18:59:46 +0100

Using Docker to deploy the front-end project practical tutorial, I've stepped on all the pits that should be stepped on for you!

Everyone's first half of life is constantly adding. But in the second half of life, we have to learn to subtract constantly. catalogue Front work 1. Things to prepare 2. Connect to ECS Install Docker environment 1. Install the dependent libraries of Docker. 2. Add the software source information of Docker CE. 3. Install Docker CE. 4. ...

Posted by bonzie on Tue, 21 Dec 2021 04:11:45 +0100

React+Redux+Ant Design+TypeScript e-commerce practice - server application 06 Order Management api and other APIs

Create order Schema // models\order.js const mongoose = require('mongoose') const Product = require('./product') const Category = require('./category') // Create snapshot type // Clone product Schema const snapshotProductSchema = Product.schema.clone() // Clone classification Schema const snapshopCategorySchema = Category.schema.clone() // De ...

Posted by Lee-Bartlett on Sat, 18 Dec 2021 19:51:06 +0100

linaria's initial experience and exploration of css architecture in react framework

Native css stage I first came into contact with react a year ago. Before that, I had been using the vue framework. React has no restrictions on vue taking the style of the component as part of the template. At that time, only the original method can be used: one css file for each component is introduced into the component, and a pile of p ...

Posted by ridiculous on Sat, 18 Dec 2021 01:03:09 +0100

React learning summary

All Tips are my notes in OneNote. The copied ones are pictures. I'm too lazy to turn to text Chapter 5: React routing 1, Relevant understanding 1.1 understanding of Spa single page web application (SPA)The whole application has only one complete pageClicking the link in the page will not refresh the page, but only make a partial update of t ...

Posted by subalan on Sat, 18 Dec 2021 00:02:41 +0100

P07: a small case of using useReducer to realize the effect of Redux

elaborate In actual use, useContext and useReducer can achieve effects similar to Redux, and for some simple personal projects, the following scheme can be used to replace Redux, which is simpler than redux. Because useContext and useReducer have been studied in my previous articles, we focus on how to simulate the effect of Redux. If you ...

Posted by hofmann777 on Fri, 17 Dec 2021 09:03:15 +0100

react source code analysis 8 Render stage

react source code analysis 8 Render stageVideo 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.render ...

Posted by MesaFloyd on Thu, 16 Dec 2021 16:35:26 +0100