Reputation: 9
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;
I am rendering the chatbox component in that render area I need to run the other application url.
I am using below route but It is redirecting to that location instead of rendering in the chatbox render area.
<Route path='/chatbox' component={() => window.location = 'http://localhost:5000/chat'}/>
How to navigate the "http://localhost:5000/chat" url in the component render area.
Upvotes: 0
Views: 96
Reputation: 2608
You may use iframe to render external site inside yours.
render() {
return (
<div className="content_block">
<iframe src="http://localhost:5000/chat" width="640" height="480" align="left">Not supported</iframe>
</div>
);
}
Upvotes: 1