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

Warn in server renderer if class doesn't extend React.Component but has a render() method #11991

Closed
gaearon opened this issue Jan 8, 2018 · 3 comments

Comments

@gaearon
Copy link
Collaborator

gaearon commented Jan 8, 2018

Same as #10103, but for the server renderer. You can look at implementation in #11168 and do something very similar in ReactPartialRenderer.js.

@wyze
Copy link
Contributor

wyze commented Jan 8, 2018

Hi Dan, I'd like to take this up. Do you have some more direction on where to put the check to determine if the component is not extended correctly? I tried putting it here: ReactPartialRenderer.js#L394 but then all the server tests threw the warning, so I don't think that was right.

@gaearon
Copy link
Collaborator Author

gaearon commented Jan 8, 2018

Maybe you want to do it right before this line?

@wyze
Copy link
Contributor

wyze commented Jan 8, 2018

Thanks! I think I got it. You pointed me in the right direction, but ended up being in the else case of that branch. PR incoming shortly.

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

No branches or pull requests

2 participants