React.createRef()/forwardRef() for React source parsing

I. React.createRef()GitHub: https://github.com/AttackXiaoJinJin/reactExplain/blob/master/react16.8.6/packages/react/src/ReactCreateRef.js Effect:Get the DOM instance of the target element Use: import React from 'react' export default class Father extends React.Completed{ constructor(props){ super(props) this.father=React.createRef( ...

Posted by iyia12co on Tue, 15 Oct 2019 21:59:11 +0200

Drag Data Loading by ReactHooks+ReactDnd

Drag to load API fields Implement automatic loading of API by dragging a background API to Form with the mouse, so the fields become forms.Drag component uses react-dnd plug-in, data interaction and page updating are implemented by Hooks.Hooks Official Documents https://react.docschina.org/docs/hooks-intro.htmlReactDnd official document http:// ...

Posted by jrtaylor on Tue, 15 Oct 2019 09:16:11 +0200

React setState - "Asynchronous"

The execution of setState is an'asynchronous'process. Why do we use quotation marks to replace these two words? It is certain that there is some truth in them. Here is an analysis of setState. setState source code analysis (v16.10.0) React source code In setState, two parameters partialState, callback are passed in: Partial State literally m ...

Posted by jscruggs on Mon, 14 Oct 2019 04:14:50 +0200

react+antd: Global Settings form Form is not Editable

When editing a page, a requirement is "Content is not editable in a specified state" Solution 1: Add disable attributes to <Input>, <Select>... for each <Input>, <Select>. This scheme may not be very convenient in the case of more form content, so Miss Gu helped me ...

Posted by chenci on Wed, 02 Oct 2019 03:21:56 +0200

Flexible encapsulation of react histogram components based on echarts

Now all kinds of frameworks and libraries are very powerful, but also because of their powerful functions, many configurations are too heavy, so there are only a few that are really useful. Today, we encapsulate a general-purpose cylindrical graph based on echarts! If you want to know about other components, you can see that other components I ...

Posted by md_grnahid on Sun, 29 Sep 2019 13:08:12 +0200

useState, useContext, useReducer, useEffect hooks commonly used in React Hooks

React is the mainstream front-end framework. Version v16.8 introduces a new API called React Hooks, which overturns previous usage. I. Disadvantages of class Components class Component Writing import React, { Component } from "react"; export default class Button extends Component { constructor() { ...

Posted by FireyIce01 on Mon, 23 Sep 2019 12:34:45 +0200

Flutter Solves Dart

Preface 1: I will update some Flutter text tutorials in the next few days.Update progress: at least two articles per week; Renewal Place: First launched in the public number, the next day updated in the digging, think about whether or not and other places; More Exchanges: You can add my Weibo 372623326, pay attention to my Weibo: coderwhy I hop ...

Posted by yelvington on Thu, 12 Sep 2019 15:04:57 +0200

React high-order components and application scenarios

Links to the original text: https://juejin.im/post/5d7893d56fb9a06af92bcdbe What are higher-order components? Before explaining what higher-order components are, you can first understand what higher-order functions are, because their co ...

Posted by JADASDesigner on Thu, 12 Sep 2019 03:49:51 +0200

Scaffolding Tool (commander)

With the continuous development of NodeJs, there are more things to do for the front end. A series of things such as Vue scaffolding, React scaffolding and so on stand out and enter people's vision. For these scaffolding tools, they just stay in the application stage, and never think about how scaffolding is realized. How the vue init webpack p ...

Posted by Innovative_Andy on Mon, 09 Sep 2019 10:23:25 +0200

React component communication

Preface Previous articles have introduced the basics of React, and this article will also document how components in React communicate through an instance. If there are any mistakes or omissions in the article, please also see the little partner give more advice and thank you first. Below_ In React, there are several situations where component ...

Posted by Allan- on Sun, 08 Sep 2019 19:07:54 +0200