【发布时间】:2018-04-10 10:08:36
【问题描述】:
import React, { PropTypes } from 'react';
import { Link, browserHistory } from 'react-router';
class Chatbox extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentDidMount() {
}
render() {
return (
<div className="content_block">
<Link to='/chatbox'></Link>
</div>
)
}
}
export default Chatbox;
我正在渲染区域中渲染聊天框组件,我需要运行其他应用程序 url。
我正在使用以下路线,但它正在重定向到该位置,而不是在聊天框呈现区域中呈现。
<Route path='/chatbox' component={() => window.location = 'http://localhost:5000/chat'}/>
如何在组件渲染区域导航“http://localhost:5000/chat”url。
【问题讨论】:
标签: javascript reactjs react-router url-routing