Closed gHashTag closed 4 years ago
4 | React = require('react'); 5 | > 6 | script = React.DOM.script; 7 | 8 | if (typeof window !== "undefined" && window !== null) { 9 | if (window.GoogleAnalyticsObject == null) {
import ga from 'react-google-analytics' const GAInitiailizer = ga.Initializer
componentDidMount(){ ga('create', 'UA-XXX', 'auto') ga('send', 'pageview') }
Because you are using a newer version of React where React.DOM is a separate package, and that's why it fails.
Why do I have this error?