Starting from 0, use webback to build a React scaffold of your own
react-cli-diy
Starting from 0, use webback to build a React scaffold of your own
Source address
Project use:
git clone git@github.com:TigerHee/react-cli-diy.git
cd react-cli-diy
npm install
Development mode launch:
npm run dev
Production packaging:
npm run build
Implementation steps:
First, create a new project directory in which npm init i ...
Added by oshecho on Thu, 07 Nov 2019 10:20:26 +0200
express builds a pure background, and the foreground uses Vue cli scaffold
Note: after the background service changes, you need to restart the service; after the front-end configuration file changes, you need to run the command npm run dev againI. use express to provide background service and output interfaceBackground directory structure:
main.js
var express = require('express');
var app = express();
app.get('/', fu ...
Added by jackiw on Thu, 07 Nov 2019 04:15:43 +0200
Write a web pack loader to get the pictures under the specified directory and return the picture URL array
Preface
I often encounter such a problem. When preloading the image resources of h5 project, we often need to manually get one image address and store it in the array, and then pre load the traversal, such as this:
let imgList = ['http://domain.com/img/1.jpg','http://domain.com/img/2.jpg','http://domain.com/img/3.jpg',...];
In the spirit of bei ...
Added by JakeTheSnake3.0 on Tue, 05 Nov 2019 17:25:23 +0200
Some knowledge of React beginners
By valentinogagliardiTranslator: front-end witSource: medium
. bind(this) is not required when using arrow functions
Generally, if there is a controlled component, it has the following structure:
class Foo extends React.Component{
constructor( props ){
super( props );
this.handleClick = this.handleClick.bind(this);
}
handleClick(e ...
Added by Archy on Thu, 24 Oct 2019 04:08:44 +0300
mpvue quick start
Main characteristics
Using mpvue to develop applets, you will acquire the following capabilities based on the technical system of applets:
Thorough component development ability: improve code reusability
Complete Vue.js development experience
Convenient Vuex data management solution: easy to build complex applications
A quick mechanism to bui ...
Added by BlackKite on Mon, 21 Oct 2019 10:44:30 +0300
vue simple use of mock
I. mock
1, introduction
mock is an analog data generator designed to help the front-end develop independently of the back-end and help write unit tests. It can simulate Ajax and return simulation data, so that the front end does not need to call the back-end interface, which is convenient for testing.
2. vue directly uses mock
step1: inst ...
Added by BRAINDEATH on Thu, 17 Oct 2019 23:45:57 +0300
Running interval timer with worker in Vue environment
Running interval timer with worker in Vue-Cli environment
Today, in code review, we found some problems left over before:
In a video playback page, there is a 40ms interval that has been blocking, resulting in a gradual increase in video delay.
So I wrote a worker and pulled the timer out and ran alone.
The implementation steps are as follows
B ...
Added by Jonob on Sun, 13 Oct 2019 22:03:44 +0300
Front-end girls let me optimize the project.
Today, the front-end girls let me optimize the project, think nothing of it, early in the morning to the company, the boss has arrived, I listened to Tingfeng Tse's song "Live via", happy to live really good, do not think, after the National Day mood is really good, rest, I quickly scrapped, hit the code, do not hit the code out of th ...
Added by Win32 on Wed, 09 Oct 2019 13:32:17 +0300
RN Simulated Wechat app Chat | Reaction Native Group Chat | Red Packet | Friendship Circle Example
Based on react-native+react-navigation+react+redux+react-native-image-picker+react-native-swiper and other technical framework development High imitation WeChat app example RN_chatroom . The functions of message sending, TextInput text box mixing emoticons, expression maps, picture selection preview, red envelope, circle of friends and so on a ...
Added by Qaid on Tue, 08 Oct 2019 18:15:34 +0300
Web pack source code analysis-complier module
Web pack source code analysis (4) - complier module
In the previous article, we saw that webpack-cli transforms the parameters passed in from the command line and the configuration items in the configuration file through `yargs', and then passes them to the compiler module of webpack to compile.
Let's take a look at what compiler has done.
Entr ...
Added by elenev on Sat, 05 Oct 2019 20:34:58 +0300