Installation and use of React scaffold and basic syntax of React
1. React installation
1.1. Use React scaffold for installation
1.cnpm install -g create-react-app
2. Replace the source npm config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
-- After configuration, you can verify whether it is successful by the following methods
npm config get regist ...
Added by B.Murali Krishna on Fri, 14 Jan 2022 01:06:46 +0200
Front end Engineering - building enterprise general scaffold
prefaceReprinted from Sohu - front end Engineering - building enterprise general scaffoldWith the concept of front-end engineering getting deeper and deeper into FEer's heart, the standardization and standardization of technology selection, code specification, construction and release processes in the front-end development process need tools to ...
Added by rv20 on Thu, 13 Jan 2022 10:14:43 +0200
You should know about hooks
What you should know about the use of hooks, you can have a look
First, let's take the first hook example.
const count=useCounter()
//This hook was called elsewhere
function useCounter(){
console.log('Called count')
// This is printed every time
const [count,setCount]=useState(0)
// useEffect(()=>{
// setInterval(() => {
// ...
Added by aktell on Sat, 08 Jan 2022 03:08:55 +0200
Lifecycle of React components
1. Overview of component life cycle
Significance: the life cycle of components is helpful to understand the operation mode of components, complete more complex component functions, analyze the causes of component errors, etc.**Component life cycle: * * the process from component creation to mounting to running on the page, and then to componen ...
Added by DickDeeds on Wed, 05 Jan 2022 23:02:50 +0200
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
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
Supplement to React routing and use of Redux
How to route parameters
pramse pass parameter
Route definition method: < route path = '/ About/:id' component = {about} / > Link component: < link to = "/ path / pass parameters through pramse" > about When passing parameters using params, you will clearly see that the parameters are displayed in the form of routing, f ...
Added by stupid girl! on Mon, 03 Jan 2022 23:12:42 +0200
Detailed explanation of React routing
route
When the application becomes complex, it needs to be processed and displayed in blocks. In the traditional mode, we divide the whole application into multiple pages, and then connect them through URL However, there are some problems with this method. Every time you switch pages, you need to resend all requests and render the whole pa ...
Added by KingIsulgard on Mon, 03 Jan 2022 20:18:21 +0200
redux tutorial - Basic Concepts
1, redux contains the following self-contained applications
state: the real data source driving the applicationview: UI declarative description based on the current stateactions: events that occur in the application based on user input and trigger status updates
2, Unidirectional data flow
state is used to describe the status of an applicatio ...
Added by Fritz on Mon, 03 Jan 2022 17:10:59 +0200