Use of React hooks

0. Create react project Now create a react project using the create react app, the official scaffold of react: Step 1: install scaffold NPM install - G create react app globallyStep 2: switch to the directory where you want to create the project and use the command: create react app react_ projectStep 3: switch the directory to the projec ...

Added by Nulletz on Fri, 11 Feb 2022 14:02:27 +0200

React Hooks learning - 03 useMemo, react memo,useCallback,useRef

useMemo hook function The behavior of useMemo is similar to the calculation attribute in Vue. It can monitor the change of a certain data and calculate a new value according to the change value. The calculated new value can participate in view rendering. useMemo caches the calculation results. If the monitoring value does not change, it will ...

Added by Fluf on Fri, 11 Feb 2022 12:50:43 +0200

[React] detailed tutorial

preface 1. Contrast between react and vue 1.1 what is modularity It is analyzed from the perspective of code Separate some reusable codes into separate modules; Facilitate the maintenance and development of the project 1.2. What is componentization It is analyzed from the perspective of UI interface Separate reusable UI elements 1 ...

Added by iainr on Fri, 11 Feb 2022 08:55:25 +0200

react source code analysis 16 Concurrent mode

react source code analysis 16 Concurrent modeVideo Explanation (efficient learning): Enter learningconcurrent modereact17 supports concurrent mode. The fundamental purpose of this mode is to make the application maintain the rapid response of cpu and io. It is a set of new functions, including Fiber, Scheduler and Lane. It can adjust the respon ...

Added by jokerfool on Wed, 09 Feb 2022 22:11:29 +0200

This may be the most complete introduction to react tutorial notes in the whole network (4W word persuasion warning)

Basic concepts of React 1, React originated from Facebook React is a JS library developed by Facebook. Facebook believes that MVC cannot meet their expansion needs 2, Characteristics 1. react impractical template 2. react is not an MVC framework 3. Responsive 4. react is a lightweight js library 3, Principle Virtual DO ...

Added by bufo on Tue, 08 Feb 2022 21:13:45 +0200

Ant Design Pro from zero to one (used by Mock)

[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-btlqds5c-1622015619538)( https://b3logfile.com/bing/20180817.jpg?imageView2/1/w/960/h/540/interlace/1/q/100 )] Meet Mock Even if we start to step into the door of AntD, then we ha ...

Added by phpknight on Tue, 08 Feb 2022 20:58:34 +0200

Talk about the synchronization and asynchrony of setState() in React class components (attached test questions)

I Two ways to write setState() update state setState(updater, [callback]), updater is the function that returns the stateChange object: (state, props) = > stateChange The received state and props are guaranteed to be up-to-datesetState(stateChange, [callback]) stateChange as the object, Callback is an optional callback function, which is ex ...

Added by PHPSpirit on Tue, 08 Feb 2022 20:41:23 +0200

Verification implementation of process designer based on BPMN JS

bpmnlint Introduction (reprinted in nuggets, plus my own understanding) The verification rules need to be controlled in the project, but it is too difficult to customize, It validates your chart against a set of defined rules and reports it as an error or warning. It can check your BPMN diagram from the command line, or through bpmn-js-bpmnli ...

Added by elbowgrease on Tue, 08 Feb 2022 13:15:04 +0200

Vue 3 custom instruction development

What is directive Both Angular and Vue have the concept of Directive. We usually translate Directive into "instruction". In computer technology, an instruction is a single CPU operation defined by the instruction set architecture. In a broader sense, "instruction" can be a representation of any element of an executable prog ...

Added by MadRhino on Thu, 03 Feb 2022 03:50:23 +0200

React hook + typescript + styled component site building

Technology selection Comparison between Vue and React Componentization vue's componentization is to put the UI structure (template), UI style (style), data and business logic (script) in one vue file, before running vue files will be compiled into real components; The Componentization of React is to implement components directly in the form o ...

Added by ganeshasri on Wed, 02 Feb 2022 16:01:20 +0200