Skip to content

Instantly share code, notes, and snippets.

@MykolaGolubyev
Created February 21, 2019 16:35
Show Gist options
  • Save MykolaGolubyev/fa8fff46f6649ae241b786bdcc18d07c to your computer and use it in GitHub Desktop.
Save MykolaGolubyev/fa8fff46f6649ae241b786bdcc18d07c to your computer and use it in GitHub Desktop.
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';
if (process.env.NODE_ENV === 'production') {
ReactDOM.render(<App />, document.getElementById('root'));
} else {
const {ComponentViewer} = require('react-component-viewer');
ReactDOM.render(<ComponentViewer .../>, document.getElementById('root'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment