我想检查当前用户是否跟在用户后面。我正在'componentDidMount‘中运行这个函数。但是我得到了下面的错误:
包含未捕获(in promise) TypeError:无法读取未定义的属性“”includes“”
根据文档,componentdidmount在第一次渲染后触发。在这里,我应该通过componentWillMount在第一次渲染中获得值。但这并没有发生。
import React from 'react';
import { connect } from 'react-redux';
import { Link } from
尽管我在应用程序的根目录进行了初始化,但我还是多次收到以下警告(针对多个页面)。这让我怀疑谷歌分析是否正常工作?[react-ga] ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually
我正在使用ReactGA来处理我的谷歌分析标签,但我不能让它工作。根据文档和其他一些在线问题,我所需要做的就是在我的应用程序根目录中插入以下代码:
App.js:
import ReactGA from 'react-ga';
ReactGA.initialize('G-