hooks Series 4: useRefs

Come and join us! "The Rookies of Xiaoheshan" provide front-end developers with technology related information and a series of basic articles. For a better user experience, please move to our official website Xiaoheshan rookies( https://xhs-rookies.com/ )Study and get the latest articles in time. Rookie, "Code tailor", if ...

Posted by mashnote on Wed, 05 Jan 2022 10:48:26 +0100

React - Ajax - axios - configure agent to solve cross domain problems - message subscription / publishing mechanism - PubSubJS - Fetch - github user search case

1, Understand 1. Pre description React itself only focuses on the interface and does not contain the code to send ajax requestsThe front-end application needs to interact with the background through ajax requests (json data)Third party ajax libraries (or self encapsulation) need to be integrated in React applications 2. Common ajax req ...

Posted by drawmack on Wed, 05 Jan 2022 08:56:46 +0100

react route guard (route interception)

Unlike Vue, react implements route interception by setting meta characters in the route. When using Vue, the framework provides the routing guard function to perform some verification before entering a certain road. If the verification fails, jump to 404 or login page, such as the beforeEnter function in Vue: ... router.beforeEach(async(to, fr ...

Posted by abhic on Mon, 03 Jan 2022 22:44:11 +0100

Note: implement a mini react

preparationOf template files to be used Warehouse address1. JSXLet's look at the jsx syntax first. What did you do babel.jsYou can see that after babel translation, these jsx syntax finally calls react CreateElement, which requires three parameters: type, props and children. Its return value is the virtual DOM object. In other words, we can use ...

Posted by nariman on Mon, 03 Jan 2022 21:18:40 +0100

react source code analysis 15 scheduler&Lane

react source code analysis 15 scheduler&Lane Video Explanation (efficient learning): Enter learning When we search in the search box component like the following, we will find that the component is divided into search part and search result display list. We expect the input box to respond immediately, and the result list can have waiting ...

Posted by jamfrag on Mon, 03 Jan 2022 07:18:26 +0100

[React basic series] status & status update & lifecycle method

In this issue, we will review the state and life cycle. This section mainly focuses on the state and life cycle of class components. The implementation of hook functions will be studied in hooks. Through the study of this chapter, you should be able to learn: How to set statusHow to this Setstate() update stateSeveral common life cycle me ...

Posted by KoA on Mon, 03 Jan 2022 05:08:15 +0100

[react project] jianshu introduction

Project function introduction Project address https://gitee.com/thinkerwing/jianshu react-devtools https://blog.csdn.net/daddykei/article/details/119225518 Search box function animation and recommendation and change function Login and logout function Drop down click more, return to the top, details page and route jump function deve ...

Posted by steveness on Mon, 03 Jan 2022 00:01:49 +0100

Ant Design Pro uses qiankun micro services to configure dynamic theme colors

After using microservice, there is a problem that the theme colors of the main application and sub application are inconsistent You want to dynamically transform the theme color of the sub application through the color of the main application Ant Design Pro can be configured through config TS configure global theme color All the best methods ...

Posted by thefamouseric on Sun, 02 Jan 2022 03:59:21 +0100

Basic tutorial for getting started with React

Basic tutorial for getting started with React What is React? React is a declarative, efficient and flexible JavaScript library for building user interfaces. Using react, you can combine some short and independent code fragments into a complex UI interface. These code fragments are called "components" What are the characteristics of ...

Posted by riddlejk on Sat, 01 Jan 2022 09:05:17 +0100

react source code analysis 15 scheduler&Lane

react source code analysis 15 scheduler&LaneVideo Explanation (efficient learning): Enter learningWhen we search in the search box component like the following, we will find that the component is divided into search part and search result display list. We expect the input box to respond immediately, and the result list can have waiting time ...

Posted by Ali25m on Thu, 30 Dec 2021 22:00:51 +0100