Quantcast
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article


Image may be NSFW.
Clik here to view.

Render 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
Browsing latest articles
Browse All 3 View Live