Mock Functions(Mock Return Values) for React 16 Jest Unit Tests

Reprinted address Mock Functions(Mock Return Values) for React16 Jest Unit Tests Project Initialization [Use previous projects here to save time] Project Initialization Address https://github.com/durban89/webpack4-react16-reactrouter-demo.git tag: v_1.0.20 Pull out git clone https://github.com/durban89/webpack4-react16-reactro ...

Posted by mike16889 on Tue, 05 Feb 2019 06:54:15 -0800

NoeJs socket.io module--Implementing Websocket protocol

NoeJs socket. IO module - Implementing Websocket protocol Believe that the little friends who read this article have a certain understanding of the Websocket protocol, here the little brother will not talk nonsense, directly on the code. Server side Background is node, using socket.io module, first install it. npm install ...

Posted by charmedp3 on Tue, 05 Feb 2019 06:06:16 -0800

Solution to Module build failed: TypeError: this._init is not a function error when using vue

It's no longer allowed to omit the '-loader' suffix when using loaders This is the first bug I encountered in learning vue2. I checked the documents on the internet. They all said that adding the suffix of - loader is enough, but it still hasn't been solved. I found the God and finally solved the problem and shared it with you ...

Posted by napier_matt on Mon, 04 Feb 2019 17:27:16 -0800

React 16 Jest ES6 Class Mocks (simulation using ES6 grammar class) Example 2

Reprinted address React 16 Jest ES6 Class Mocks (simulation using ES6 grammar class) Example 2 Project Initialization git clone https://github.com/durban89/webpack4-react16-reactrouter-demo.git  cd webpack4-react16-reactrouter-demo git fetch origin git checkout v_1.0.30 npm install ES6 Class Mocks (simulation using ES6 gramm ...

Posted by cronus on Mon, 04 Feb 2019 16:33:16 -0800

Packing node JS project error with web pack: ERROR in. / node_modules / MySQL / lib / Connection. JS

A beginner, recently learning the project of Web pack packaging nodejs, but packaging is always unsuccessful, the most mistake is that I can not find the file, but I installed it with npm install, who has encountered this problem? Consult.. Error reporting information: Specific configuration of files package.json { "name": "do ...

Posted by hemlata on Sat, 02 Feb 2019 21:48:16 -0800

vue components from development to publication

Componentization is a very important part of front-end development. Decoupling from business can improve the code reuse rate of the project. More importantly, we can pack and distribute. As the saying goes, the collective power is great, because there are so many open source contributors, we have the world today. Engineers who ...

Posted by UrbanCondor on Sat, 02 Feb 2019 15:00:15 -0800

Maven and Nexus3

Maven and Nexus3 What is Maven? For details on the principle of maven, see: https://my.oschina.net/adailinux/blog/2247017 Installation and configuration Install Maven Installing Maven on centos7 system is very simple. You can install it directly with yum, but before installing maven, you need to configure the JDK (java) environment of the syste ...

Posted by kaszu on Fri, 01 Feb 2019 19:51:15 -0800

Introduction to TypeScript

Introduction to TypeScript Before using TypeScript, we need: Installing TypeScript uses nmp-v to check whether npm is installed Use tsc-v to check whether the TypeScript environment is installed or not, use NPM install-g type script installation environment, use tsc test.ts to mutate the TypeScript.ts file into JavaScript.js ...

Posted by rcity on Tue, 29 Jan 2019 04:39:14 -0800

How to build a project based on react, webpack 4, Babel 7 (1)

Preface Writing front-end projects for so long, the previous dva framework, and later the create-react-app framework, need to make some customized changes for the team. A little vague about the workflow of webpack and the upgrade of webpack@4 according to the official document of webpack have greatly improved the performance, while create-react ...

Posted by trace on Fri, 25 Jan 2019 10:39:14 -0800

Use hexo+coding to build a free personal blog

1. Detection of node and npm Check for node.js and npm first $ node -v //If so, the installation of node.js is successful! $ node -v v8.4.0 //If yes, the installation of npm is successful! $npm -v $ npm -v 5.3.0 2. install hexo Run the following command in git-bash to install hexo Install hexo Global $ npm install -g hexo-cli Create folders he ...

Posted by gabeanderson on Fri, 25 Jan 2019 00:57:15 -0800