Skip to content

[16.0.0-alpha.12] ReactDOM removes server rendered content before rendering it again #10405

@siddharthkp

Description

@siddharthkp

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
In React 16, ReactDOM removes server rendered content before rendering it again. (tested on 16.0.0-alpha.12). For applications with a big component tree, this is perceivable by the user.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

I have reproduced the bug here.

Tiny app:

  1. There's a box component which is rendered on the server with renderToString and sent to the
    client.
  2. The client loads bundle.js which contains the same component.

I have a added debugger in componentWillMount for the box component to show this
(open your dev tools)

React 15.6.1: https://recon-15.now.sh/
React 16.0.0-alpha.12: https://recon-16.now.sh/

Code is here: https://github.com/siddharthkp/react-16-reconciliation-bug

What is the expected behavior?
ReactDOM should perform reconciliation without removing content. (React 15 had this behavior)

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Browser: Chrome
Current version: 16.0.0-alpha.12
Previous version: 15.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions