Skip to content

Instantly share code, notes, and snippets.

@iinsta
iinsta / ReactBasicComponent.js
Last active October 23, 2017 16:36
react async load componet demo
import React from 'react'
export default React
export class BasicComponent extends React.Component {
componentWillUnmount() {
this.willUnmount && this.willUnmount()
this.__unmount = true
}
componentDidMount() {
@iinsta
iinsta / ns.js
Last active August 3, 2017 15:05
'use strict';
function GeneratePassword(length) {
var str1='qwertyuioplkjhgfdsazxcvbnm';
var str2='QWERTYUIOPLKJHGFDSAZXCVBNM';
var str3='1234567890';
var str4='!@#$%^&*.,';
var str = [str1,str2,str3,str4].join('')
var res = '';
for (var i=0; i < length; i++) {