You should not use <Link> outside a

后端 未结 10 1701
既然无缘
既然无缘 2020-11-27 15:55

I\'m trying to set up react-router in an example application, and I\'m getting the following error:

You should not use  outside a 
         


        
10条回答
  •  抹茶落季
    2020-11-27 16:14

    If you don't want to change much, use below code inside onClick()method.

    this.props.history.push('/');
    

提交回复
热议问题