Category: Front-end

0

Custom hooks

Where to use With custom Hooks, component logic can be extracted into reusable functions. React Hooks means that components should be written as pure functions as much as possible. If external funct

0

useEffect

useEffect() side effects Pure functions can only perform data calculations. Where should operations that do not involve calculations (such as generating logs, storing data, changing application stat

0

useState

Basic usage 1const [count, setCount] = useState(initialState) count is to read state, setCount is to update state, and initialState is initial value. ​ State is an array Because React renderin

0

Axios parameters

Request Configuration These configuration objects can be used not only in axios( ), but also in .request( ), .post( ) and other request methods. 12345678910111213141516171819202122232425262728293031

0

Axios basics

Axios Introduction Both React and Vue use Axios to send data requests. Axios can run in the browser and send Ajax requests to the server. Axios can also run in node.js, making http requests to the s

0

Http basics

Http basics The client sends a request (request message) to the server, and the request content includes request line, request header, and request body. The server responds to the data returned by t

0

props in route@5

Pass the params parameter There are three ways to carry parameters in ajax: query, params, body. The body parameter has two encoding forms: urlencoded and json. There is also a params form in routin

0

Nested route@5

Secondary route writing method (in the @6 version there is no such problem) File location: The component folder is created under the first-level routing folder. Navigation link location: in the rout

0

Advanced usage of route@5

Routing components and general components General components are placed in the src-components tag, but routing components are not in compliance with the specification. When standardizing developmen