This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Per <http://stackoverflow.com/questions/5691901/using-the-underscore-module-with-node-js>, | |
from the Node.js REPL, use two underscores (__) instead of a single underscore (_) | |
because Node uses _ for the last return value. | |
Note that if your program is in a file, you can still use a single underscore (_). | |
*/ | |
var __ = require("underscore"); | |
__.each([1, 2, 3], function(e) { console.log(e); }); |