Skip to content

Instantly share code, notes, and snippets.

@hex13
hex13 / render-promise-in-react.js
Created November 3, 2016 12:33
how to render promises in React
//License CC0 1.0: https://creativecommons.org/publicdomain/zero/1.0/
class Deferred extends React.Component {
constructor(props) {
super(props);
this.state = {
value: ''
};
}
componentDidMount() {
@markerikson
markerikson / webpackAndNodeEnv.md
Last active January 18, 2018 03:01
Webpack and confusion with process.env.NODE_ENV

2016-07-10 - #webpack - Initial discussion and confusion

[09:38 PM] Steven: No matter what I do, I cannot get the NODE_ENV to be production for the purposes of webpack compiling
I have tried every example on the web

    plugins: [  
        new webpack.DefinePlugin({  
            'process.env':{  
 'NODE_ENV': JSON.stringify('production')