Self made scaffold

After learning the basis of Webpack, you will always be confused when you check the scaffold written by others. Later, you can check all kinds of materials on the Internet, modify them while referring to them, and complete a set of simple Scaffolding (uploaded to GiuHub and npm I have learned from Create React App (CRA) directory structure (as ...

Posted on Mon, 18 May 2020 22:56:33 -0400 by Vertical3

Configuring eslint in vscode

Install Nodejs and then eslint Use global installation: npm install -g eslint npm install -g eslint-plugin-html After installation, we use the "eslint --init" command to generate a configuration file in the user directory (or anywhere you like): ". eslintrc.js“ After executing the command, we can select the corresponding ...

Posted on Tue, 05 May 2020 10:25:15 -0400 by TimUSA

How to record external chain js file in react component

1. Description All of the following are from A complete collection of my github articles Content. Welcome to github, star, issue welcome! 2. How to add js file in react component export default class Script extends React.Component { static propTypes = { attributes: RPT.object, // eslint-disable-line react/forbi ...

Posted on Mon, 04 May 2020 10:35:47 -0400 by oocuz

React navigation 5.0 Series III: the use of Drawer navigation

First of all, I wish you all a happy youth day and May Day holiday. In the previous series of articles, we learned about the use of stack navigation and tab navigation in the latest version of 5.0. Today, we'll take a look at the use of drawer navigation. React Navigation5.0 series I: the use of stack navigator React navigation 5.0 Series II: t ...

Posted on Mon, 04 May 2020 10:10:02 -0400 by aboyd

React native layout practice

My predecessors taught us that the fastest way to master a new technology is to practice. So, I found a more loving, heating interface. Of course, I don't want to advertise for meituan, but I think the page is quite fresh. Here is the effect to display: The third article basically has a general understanding of the layout of react native. L ...

Posted on Sat, 02 May 2020 20:37:34 -0400 by thehigherentity

ReactNative (IV) Mobx installation and use

Recommend Bowen English note install Use The front Simple click to change state Cross component interaction Variables that can be directly decorated with observable can be added to the React component Recommend Bowen https://www.jianshu.com/p/505d9d9fe36a English https://medium.com/react-native-t ...

Posted on Sat, 02 May 2020 18:17:58 -0400 by linda thomas

The use case of GraphQL in koa2 server

1, Create project 1. Install some packages npm install koa --save npm install isodate --save npm install koa --save npm install koa-bodyparser --save npm install koa-router --save // Handling cross domain roles npm install koa2-cors --save npm install mongoose --save // These two are the syntax of ES6 npm install ba ...

Posted on Fri, 01 May 2020 16:02:19 -0400 by tappy

Jest front end unit test tool

Jest and enzyme front end unit testing tools What is Jest? Jest is a delightful JavaScript testing framework that focuses on simplicity. It is suitable for projects using Babel, TypeScript, Node, React, Angular, Vue, etc! Characteristic Zero configuration snapshot Isolated Great api Introduction Use yarn to install jet: yarn add --dev jest ...

Posted on Tue, 28 Apr 2020 21:41:17 -0400 by Wave

Implementation of draggable div in react

The drag div function is encapsulated into a class by react, which can be directly introduced into the class on the page. title is a draggable area. panel is the container to drag. It optimizes the situation that the drag box is out of the page range, the mouse is out of the draggable area when the drag is too fast, and the situation that the d ...

Posted on Thu, 23 Apr 2020 10:33:29 -0400 by dasmon777

Is React setState synchronous or asynchronous

Environmental Science React 16.9.0 React-Dom 16.9.0 Preface From the running results of the following code, we can draw the following conclusions: In setTimeout and native events, you can get the update results immediately. That's synchronization In composite events and lifecycles, you cannot get the update results immediately. It's cal ...

Posted on Tue, 21 Apr 2020 00:05:08 -0400 by leon_zilber