Home

0

Basic usage of route@5

React-router understanding A plugin library for react. (react-xxx are basically plug-in libraries) The library we installed here is not react-router. react-router has three libraries for three pla

0

SPA, route

SPA Definition Single page web application (single page web application, SPA). The entire application has only one complete page. (Single page with multiple components) That is, there is only th

0

Fetch

Send request method classification xhr class: ajax (native xhr, troublesome), jQuery (third party, may generate callback hell), axios (third party) fetch: (built-in non-third-party, promise style)

0

PubSub

Passing values (communication) between sibling components Passing values between parent and child components: With the help of props, the child passes a function to the parent with props, and the ch

0

Github searching case study

Case introduction In this case, there is a search bar above and a display bar below. After searching, the user’s avatar and username will be displayed. Click on the avatar to enter the user’s homep

0

Ajax & CORS in React

Ajax requests in React React needs to integrate a third-party ajax library or package it yourself. Generally use axios. Reason for Proxy cross domain If the proxy is not configured, cross-domain i

0

Spread operator

Spread operator … (array) The spread operator can split an array or array-like structure into a comma-separated sequence of arguments. 12const arr = [1, 2, 3];console.log(...arr) //result is 1 2 3

0

Arrow Functions, Rest params

Extensions to Functions: Arrow Functions => 123let fn = function(m){return m}; //ordinary functionlet fn = (m) => {return m} //complete writing of arrow functionlet fn

0

Let, Const, Destructuring assignment

Declares variable a by ‘let’ let is the new way to declare variables in ES6, replacing var. 1234let a;let b, c, d;let e = 100;let f = 521, g = 'iloveyou', h = []; var: allows repeated de

0

Closure

Closure When a function is defined, it holds a reference to the external environment in which it exists. This means that a function can access variables in the scope in which it is defined, and thi