Leave confirmation customization in react Route 4

In some applications, the product requirements are as follows: for example, when the user jumps to the route, the user needs to be prompted that the data of the current page has not been saved, and the user needs to be prompted to leave for confirmation. The general effect is as follows: image.png Previous router router pract ...

Posted by dnast on Sat, 04 Apr 2020 06:30:56 +0200

ReactNative: ReactContext!=Activity

In the project, there is a bookshelf View provided to react native for use. It monitors the corresponding life cycle of react native to refresh the interface. The code is as follows //ViewManager public class BookShelfManager extends SimpleViewManager<BookShelfView> { private BookShelfView mBookShelfView; @Override ...

Posted by rinjani on Fri, 03 Apr 2020 10:46:41 +0200

Development of React Native -- component Text

Preface Text component is a basic component in React. It is similar to TextView component on Android. It is used to display text. Besides basic display layout, this control can be nested, styled, and event handling functions can be added. Basic Usage Attribute method Here I just give some more commonly used attribute method ...

Posted by Mesden on Thu, 02 Apr 2020 14:06:38 +0200

Inheritance of class in ES6

Inheritance of class in ES6 Parent class (base class) Subclass extends keyword //Parent class class Human{ //Constructor of the parent class constructor(name,age,sex,hobby){ this.name=name this.age=age this.sex=sex this.hobby=hobby } desc(){ const {name,age,sex,hobby}=this consol ...

Posted by luketheduck on Fri, 27 Mar 2020 16:00:53 +0100

Class component details

1, class component creation method import React from 'react'; class B extends React.Component { constructor(props){ super(props); } render(){ return ( <div>hi</div> ) } } 2, Props external data class Parent extends React.Component { constructor(props){ super(props) this.state = {name:'frank'} ...

Posted by newcastle_unite on Wed, 18 Mar 2020 09:54:50 +0100

Reuse of component state logic: render props mode and higher-order components

Article directory 1, Render props mode 1.1 overview of react component reuse 1.2 thinking analysis 1.3 operation steps 1.4 children instead of the render attribute 1.5 code optimization 2, High order components 2.1 overview 2.2 thinking analysis 2.3 use steps 2.3 settings ` displayName` 2.4 transf ...

Posted by abduljan on Mon, 27 Jan 2020 08:52:43 +0100

Learning while using -- using the Material UI framework under React to develop a simple web version Ethereum wallet imitating MetaMask

In the previous article, we learned the use of route in React and created an import interface; this time, we learned the specific implementation of wallet and the development of login interface, and connected the three UI s of login interface, create wallet and import wallet through wallet. 1, Further ...

Posted by rage123456 on Sun, 26 Jan 2020 12:21:24 +0100

JavaScript code style

JavaScript code style 1. specification In order to agree on your code style, some relatively standard code style specifications have been born in the community: JavaScript Standard Style Airbnb JavaScript Style 2. ESLint ESLint only provides tools and rules, how to configure these rules depends on the user. This is ill ...

Posted by senyo on Mon, 06 Jan 2020 02:35:07 +0100

Web front-end UI framework JQuery WeUI

  Get JQueryUI http://jqweui.com/ Jquery WeUI is a jQuery implementation version of WeUI. In addition to the official plug-ins, it also provides a variety of extension components such as pull-down refresh, calendar, address selector, etc. The JS components in jQuery WeUI are provided in the form of jQuery plug-ins, which are ...

Posted by gpong on Sat, 28 Dec 2019 16:23:55 +0100

How to import iconfont into react native Expo

Step 1 download Icoont Alibaba vector map After logging in the website, add the required icon to the library as follows: Then download to local. (Note: the compressed package downloaded by my google browser is empty, and it was successfully downloaded by using other browsers.) It has the following contents: Step 2: crea ...

Posted by PugJr on Sun, 22 Dec 2019 19:47:11 +0100