Skip to content

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

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

Closed
lijunle opened this issue Nov 16, 2014 · 2 comments
Closed

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

lijunle opened this issue Nov 16, 2014 · 2 comments
Labels

Comments

@lijunle
Copy link

lijunle commented Nov 16, 2014

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.

@Daniel15 Daniel15 added the Bug label Nov 16, 2014
@Daniel15
Copy link
Member

Good catch! Thanks for reporting. I'll fix this tomorrow.

@Daniel15
Copy link
Member

This is now fixed and you can use the development build of the NuGet packages (http://reactjs.net/getting-started/download.html#development-builds) to test out the changes before a stable release. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants