Follow the react project (to P17)
git command steps
Programmer A
git init
git add . # Add to staging area
git commit -m "init app" # Submit to local warehouse
# Associate to remote warehouse and alias the address
git remote add origin https://gitee.com / remote warehouse address git
git push origin master # Push local master branch to remote master branch
git checkout -b ...
Added by ShawnD on Fri, 04 Mar 2022 11:20:39 +0200
Overview: from state reuse to Hooks
Test Hooks' proficiencyWhy can't Hooks be used in for loops and if statementsReact.memo,React.useCallback,React. The role and comparison of usememoThe value in useState is an object. If you change the value in the object, will the component render? If you use react It's wrapped in memo()What is the (Implementation) principle of Hooks?What is th ...
Added by pppppp on Fri, 04 Mar 2022 06:29:40 +0200
Notes from the useEffect Complete Guide
This is a personal note, not a tutorial. It is recommended to read the original text. Although it is longer, it is still very advantageous to try it two or three times. If you have problems, you can communicate with each other.
Original address: https://overreacted.io/zh-hans/a-complete-guide-to-useeffect/ Author profile: https://overreacte ...
Added by itshim on Fri, 04 Mar 2022 02:47:33 +0200
20 lines to simply implement an unstated next
preface ๐
๐ unstated-next State management based on React mental model (hook+context). ๐
[the external chain image transfer fails. The source station may have an anti-theft chain mechanism. It is recommended to save the image and upload it directly (IMG uhrmuffj-1618884145855)( https://raw.githubusercontent.com/blazer233/unstated-next ...
Added by raydona on Fri, 04 Mar 2022 02:23:28 +0200
graphql+koa2 front end bff layer
Recently, I'm working on integrating graphql into the project. The reason is that the back end of our team uses restful specification. Redundant fields may appear in every query. To eliminate these redundant fields is not technical and time-consuming for back-end students. In addition, the back-end students are not very interested in the bff la ...
Added by antisback on Tue, 01 Mar 2022 05:46:52 +0200
About 100 to realize the query form? Really? Let's experience the charm of Amiya.
"Brother, I heard you wrote a lot of pages. I have a page here. How much code do you think you need?""Let me see. It's OK. It's just a query form. Now everyone uses ProComponent. Write it quickly with that. I think it's about 200 lines.""Well, I know, the official secondary packaging component library, 200 lines is OK? ...
Added by the_Igel on Tue, 01 Mar 2022 05:25:20 +0200
react hooks introduction booklet
Strongly recommend this react hooks tutorial: https://github.com/puxiao/react-hook-tutorial
react hooks
What is react hooks?
(1). Hook is a new feature / syntax added to React 16.8.0 (2). You can use state and other React features in function components โ Three commonly used hooks (1). State Hook: React.useState() (2). Effect Hook: Re ...
Added by youngp on Mon, 28 Feb 2022 06:17:30 +0200
Introduction and implementation of React virtual scrolling
๐ Reading and sharing
It is neither the people nor the state who maintain the death penalty system, but the murderers themselves 13 steps of disappearance [RI] Takano and Ming
Virtual scrolling: reuse your DOM elements and remove an element of your viewport according to the user's scrolling direction.
When the list needs to display tens ...
Added by nitko on Sun, 27 Feb 2022 17:40:02 +0200
State improvement of React core concepts
State promotionIn React applications, any variable data should have only one corresponding and unique "data source". Usually, state is first added to the component that needs to render data. Then, if other components also need this state, it can be promoted to the common parent component of these componentsFor example, you want to rea ...
Added by lonerunner on Fri, 25 Feb 2022 04:41:59 +0200
ESLint source code analysis
The daily development of the front end is inseparable from the support of all kinds of lint, but some people just don't like it. The code writing method is arbitrary and capricious, so we don't force it. In fact, the definition of specifications mainly depends on the habits of open source project authors or the coding habits of the company team ...
Added by hucklebezzer on Thu, 24 Feb 2022 12:09:53 +0200