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

Uncaught TypeError: Cannot read property '__reactAutoBindMap' of null #8

Closed
shaimo opened this issue Apr 4, 2015 · 4 comments
Closed

Comments

@shaimo
Copy link

shaimo commented Apr 4, 2015

This worked for me before, so maybe it's a compatibility issue with react 0.13?
I simply require('react-paginate'), then try to render ReactPaginate:

    React.render(<ReactPaginate />, document.getElementById(options.element_id))

and I get the error:

Uncaught TypeError: Cannot read property '__reactAutoBindMap' of null ReactClass.js:842 ReactClass.createClass.Constructor ReactLegacyElement.js:191 ReactLegacyElementFactory.wrapCreateElement.legacyCreateElement PaginationBoxView.jsx:84 React.createClass.render ReactCompositeComponent.js:1260 
(anonymous function) ReactPerf.js:50 
ReactPerf.measure.wrapper ReactCompositeComponent.js:802 
(anonymous function) ReactPerf.js:50 
ReactPerf.measure.wrapper ReactComponent.js:405 ReactComponent.Mixin._mountComponentIntoNode Transaction.js:134
 Mixin.perform ReactComponent.js:381 
ReactComponent.Mixin.mountComponentIntoNode ReactMount.js:312 
(anonymous function) ReactPerf.js:50 
ReactPerf.measure.wrapper ReactMount.js:381 
ReactMount.render ReactPerf.js:50 
ReactPerf.measure.wrapper TabContent.js.jsx:92 
category_show

category_show is the first function called and is just doing the render...

@shaimo
Copy link
Author

shaimo commented Apr 4, 2015

Forgot to mention that there is also a warning in the console:

Warning: This JSX uses a plain function. Only React components are valid in React's JSX transform. 
warning.js:36
Warning: Something is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory warning.js:48

@shaimo
Copy link
Author

shaimo commented Apr 5, 2015

After a lot of further investigation, this seems to be a general issue when using react/addons - facebook/react#3593
The issue goes away when using just 'react'. Currently react/addons is being used in PaginationListView.jsx, but it's not really needed there. If you change it to 'react' everything works ok...

@AdeleD
Copy link
Owner

AdeleD commented Apr 5, 2015

Thank you very much for your investigation.
Indeed react/addons is not really needed in PaginationListView.jsx. I used it for 'classSet' but it is not needed anymore as I now import the 'classname' package.

@AdeleD
Copy link
Owner

AdeleD commented Jun 22, 2015

I close the issue. Answers are available here: facebook/react#3593. Thank you.

@AdeleD AdeleD closed this as completed Jun 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants