Skip to content

Instantly share code, notes, and snippets.

@hex13
hex13 / render-promise-in-react.js
Created Nov 3, 2016
how to render promises in React
View render-promise-in-react.js
//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 Jan 18, 2018
Webpack and confusion with process.env.NODE_ENV
View webpackAndNodeEnv.md

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')