私はReact with SSR FlowRouterを使用しています。このため、ラインのReact SSR - window.height/widthを処理する
:
var height = (Meteor.isClient ? window.innerHeight : 0);
<div style={{top: height+'px' }}>
私は、このような警告が出ます:
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.
私が原因で、クライアントとサーバのコードの違いのザッツを知っている(私はへのアクセスを持っていません私のサーバー上のウィンドウ)。
この警告を回避する方法はありますか?
投稿していただきありがとうございますか? – Coherent