Browse Source

Expose react as global (#1501)

main
Daniel Husar 6 years ago
committed by Dan Abramov
parent
commit
8127896a94
  1. 7
      gatsby-browser.js

7
gatsby-browser.js

@ -6,12 +6,19 @@
'use strict';
const React = require('react');
const ReactDOM = require('react-dom');
// Import global styles
require('normalize.css');
require('./src/css/reset.css');
require('./src/prism-styles');
require('./src/css/algolia.css');
// Expose React and ReactDOM as globals for console playground
window.React = React;
window.ReactDOM = ReactDOM;
// A stub function is needed because gatsby won't load this file otherwise
// (https://github.com/gatsbyjs/gatsby/issues/6759)
exports.onClientEntry = () => {};

Loading…
Cancel
Save