Coder Social home page Coder Social logo

designtrigger's People

Contributors

y-temp4 avatar

Stargazers

 avatar

Watchers

 avatar

designtrigger's Issues

クライアントとサーバーのレンダリングに差がある

症状

https://gyazo.com/f251dbabb1da19671f2fd1de9bd64a12

こんなんが出る、具体的には以下

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) <div data-reactroot="
 (server) <pre data-reactroot="

原因

  • remarkを使ってる部分だけでるので多分これ(もしくはここ関連)が原因
  • Linkタグを用いたページ遷移時は発生せず、URL直打ちでHTMLが返却されたときのみ発生する

対処法

  • エラーの箇所がよくわからない
    • サボってソースマップ吐き出してない
  • とりあえずソースマップ吐き出すところから始める
  • 簡単にググった感じだと日本語の情報はかなり少ない
    • しかもreact-router関連の記事
    • 地道に読み進めるしかない

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.