↧
Answer by Shubham Khatri for Render two components at two different ids- React
It is perfectly fine to use two ReactDOM.render() in a single script. See example below var Hello = React.createClass({ render: function() { return <div>Hello {this.props.name}</div>; } });...
View ArticleAnswer by Piotr Berebecki for Render two components at two different ids- React
Is this what you are after? http://codepen.io/PiotrBerebecki/pen/kkyYJv The script tag to your js file should be put at the bottom of the body tag (below the targeted ids). HTML: <head>...
View ArticleRender two components at two different ids- React
I have a situation where I require to render two different components at two DIFFERENT ids. Something like this: ReactDOM.render( <Component1/>, document.getElementById('Coponent-id-1')); and:...
View Article