Skip to content

Server-side render pops up warning about deprecated usage. #46

@lijunle

Description

@lijunle

Hi,

The server-side render is good, while it still render the old style initialization usage, like this:

React.render(
  HelloWorld({"name":"Daniel"}),  // <----------- HelloWorld is a component
  document.getElementById("react1")
);

But, this has been deprecated, as mentioned in this post. The better way could be:

React.render(
  React.createElement('HelloWorld', {"name":"Daniel"}, null),  // <---------- new style
  document.getElementById('react1')
);

Please update to use the factory pattern to initialize component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions