Skip to content

Instantly share code, notes, and snippets.

View chengjianhua's full-sized avatar
💦

Jianhua Cheng chengjianhua

💦
View GitHub Profile
@chengjianhua
chengjianhua / Enhance.js
Created June 10, 2016 11:27 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@chengjianhua
chengjianhua / index.html
Created March 26, 2017 05:19 — forked from anonymous/index.html
preview images with slide animation
<div>
<div id="preview" class="preview">
<nav class="nav">
<button class="close">
返回
</button>
</nav>
<div class="container">
<button class="prev">&lt;</button>
<button class="next">&gt;</button>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>