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

Invalid access to component property "render"; Invariant Violation #45

Closed
garthk opened this issue Jun 24, 2014 · 2 comments
Closed

Invalid access to component property "render"; Invariant Violation #45

garthk opened this issue Jun 24, 2014 · 2 comments

Comments

@garthk
Copy link

garthk commented Jun 24, 2014

Trying the example from README, I'm getting a warning and an error:

react-with-addons-0.10.0.js:5670: Invalid access to component property "render" on Unknown at the top level. See http://fb.me/react-warning-descriptors . Use a static method instead: <Unknown />.type.render(...)

react-with-addons-0.10.0.js:5670: Error: Invariant Violation: ReactCompositeComponent.render(): A valid ReactComponent must be returned. You may have returned null, undefined, an array, or some other invalid object.

I can reproduce this in the Node REPL:

> var React = require('react'), Route = require('react-nested-router').Route;
> var App = React.createClass({ render: function() { return React.DOM.p(null, 'app'); } });
> React.renderComponentToString(App())
'<p data-reactid=".2b0hddk49a8" data-react-checksum="-225571812">app</p>'

> React.renderComponentToString(Route({ handler: App }))
Error: Invariant Violation: ReactCompositeComponent.render(): A valid ReactComponent must be returned. You may have returned null, undefined, an array, or some other invalid object.

This is with react-nested-router@0.1.0 and react@0.10.0.

@garthk
Copy link
Author

garthk commented Jun 24, 2014

Aargh! Fix: npm install react-nested-router again so you can pick up 0.2.0 or later.

@garthk garthk closed this as completed Jun 24, 2014
@mjackson
Copy link
Member

@garthk Glad you found the fix :) This is a fast moving target ATM, so keep an eye out for new stuff.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants