Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM diff and component stack in SSR hydrate mismatch warnings (#10085) #12063

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fixtures/ssr/server/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if (process.env.NODE_ENV === 'development') {
assets = require('../build/asset-manifest.json');
}

export default function render() {
var html = renderToString(<App assets={assets} />);
export default function render(url) {
var html = renderToString(<App assets={assets} url={url} />);
// There's no way to render a doctype in React so prepend manually.
// Also append a bootstrap script tag.
return '<!DOCTYPE html>' + html;
Expand Down
2 changes: 2 additions & 0 deletions fixtures/ssr/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {Component} from 'react';

import Chrome from './Chrome';
import Page from './Page';
import SSRMismatchTest from './SSRMismatchTest';

export default class App extends Component {
render() {
Expand All @@ -10,6 +11,7 @@ export default class App extends Component {
<div>
<h1>Hello World</h1>
<Page />
<SSRMismatchTest url={this.props.url} />
</div>
</Chrome>
);
Expand Down
Loading