[React family bucket] through the component design mode, making simple todo (including source code)
1, Design project structure
Because we implement todo as a functional component, the basic design idea is:
1. Create a todo folder in components and a new index JSX is a todo component. This folder contains some todo widgets
2. On app Import todo from 'is introduced into JSX/ Components / todo 'and render in render:
import Rea ...
Posted by FijiSmithy on Sun, 23 Jan 2022 12:42:51 +0100
Intensive lecture on Ant Design Pro V5 (basic Chapter 5): useMemo and useCallback
Demand scenario
Sometimes, some calculations may be complex and time-consuming, or because the function component itself is not divided into mount and update, that is, as long as setState is called, the re rendering of the component will be triggered, regardless of whether the values of the front and rear states are different. In addition, whe ...
Posted by kurtis on Sat, 22 Jan 2022 23:19:23 +0100
React learning notes - component communication
1, Component communication concept
In React, components are independent and closed units. By default, the data in component state is private data, and components can only use their own data. However, in the actual project development process, our page is composed of multiple components, and these components inevitably share some data. This pro ...
Posted by RClapham on Fri, 21 Jan 2022 23:27:30 +0100
Detailed explanation of the use of React Hook
1: Introduction
Hook is a new feature of React 16.8. It allows you to use state and other React features without writing class.
hook introduction time (react version update event)
- 2013 May 29 v0.3.0 Facebook Open source React
.....
- 2014 October 28 v0.12.0 use BSD agreement+Additional patent license agreement- ...
Posted by MLJJ on Fri, 21 Jan 2022 14:57:20 +0100
The test platform series (88) completes the email notification function (with a beautiful email template)
Hello ~ I'm Milo!
I'm building an open source interface testing platform from 0 to 1, and I'm also writing a complete set of corresponding tutorials. I hope you can support me.
Welcome to my official account MENOIR's diary, get the latest article tutorial!
review
Last time, we found a seemingly good email template, but because the data is dead ...
Posted by fangorn on Wed, 19 Jan 2022 16:39:54 +0100
[React basic series] what is JSX and how to use JSX
React is a library developed, open-source and maintained by facebook, and the meaning of react is to use JavaScript to realize user interaction - a JavaScript library for building user interfaces.
Therefore, in essence, React is a library, and its role is to use JavaScript to realize user interaction.
Its core idea is to use JavaScript to ...
Posted by Copyright on Mon, 17 Jan 2022 22:29:55 +0100
Form development mode
If you master value/onChange, you will master the essence of form writing.The management side component has only two purposes:Collect data from usersShow data to usersThere are three data formats for collecting data from users:The value of the original data type (such as string/number, etc.)objectarrayTherefore, the development mode of collecti ...
Posted by Scabby on Mon, 17 Jan 2022 11:57:36 +0100
Higher order component learning
Before understanding higher-order components, you need to understand the lower higher-order functions, because they are very similar.
Higher order function: accept function as parameter or return value as function. The common filter, map and reduce functions in js are high-order functions, including memo functions.
High order component: the h ...
Posted by hostcord on Sun, 16 Jan 2022 07:35:09 +0100
React Redux implementation of TodoList small case
React Redux is a common component in react ecology, which can simplify the Redux process. (note the concepts: react, Redux and react Redux are three different things)
1. Install react Redux dependency
npm install --save react-redux
2. < provider > provider
< provider > is a provider. As long as this component is used, all other ...
Posted by nick1 on Fri, 14 Jan 2022 10:36:33 +0100
React quick start
React quick start
As one of the three frameworks today, React has sorted out some notes and shared them after a short-term study: if there are errors, you are welcome to point them out.
1. What is React
React It's a product made by Facebook Developed to construct a user interface Javascript Library.
React And Vue comparison, vue The syntax i ...
Posted by kb0000 on Fri, 14 Jan 2022 01:19:28 +0100