monorouter icon indicating copy to clipboard operation
monorouter copied to clipboard

Issue with examples running with react 0.13.3

Open svnm opened this issue 9 years ago • 1 comments

If I try to use the examples with react and change to the updated version 0.13.3 I get the following error:

Cannot read property '__reactAutoBindMap' of undefined

svnm avatar Jun 04 '15 03:06 svnm

Hi, I was playing around with this as well on the monorouter flux example and found that if I use react v 0.12.* I get the following warning

Warning: Something is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory

This link states that the error is as follows: You probably came here because your code is calling your component as a plain function call. This is now deprecated:

When I change to react v 0.13, I also get the error, and as we can see this deprecated patterns no longer works http://facebook.github.io/react/blog/2015/03/10/react-v0.13.html

I guess this means we cannot call with a function that simply renders with this.render() as in the examples here and the monorouter-flux examples

I traced the problem down to monorouter-react in engine.js renderToStrong() method, so not sure if it is a problem here, or that you need to call React.createFactory on your component before passing it to this.render

navela avatar Jun 09 '15 00:06 navela