Data from HTML to ReactJS

How to pass data into a React app from the HTML to parameterise it.

HTML:

<div id="app" data-feed='custom_feed.json' data-someprop='value'></div>

JS:

var root = document.getElementById('app');
ReactDOM.render(<X {...(root.dataset)} />, root);