warning.js:44 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) om MyComponent</h1><ons-button data-reac
(server) om MyComponent</h1></div></section>
It is clear that what is rendered at server side is not equal to what was rendered at client side.
What I did was including an existing ReactJS component library called react-onsenui (see https://onsen.io/v2/react.html).
require('onsenui/css/onsenui.css');
require('onsenui/css/onsen-css-components.css');
require('onsenui');
import * as React from 'react';
const s = require('./style.css');
const Button = require('react-onsenui').Button;
class Home extends React.Component<any, any> {
constructor(props) {
super(props);
this.handleButtonClick = this.handleButtonClick.bind(this);
}
handleButtonClick() {
console.log("CLICKED");
}
render() {
return (
<div className={s.home}>
<img src={require('./barbar.png')} />
<p>Hello world!</p>
<Button onClick={this.handleButtonClick}>MY BUTTON</Button>
</div>
);
}
}
export { Home }