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

props not being passed through to react component #10

Open
cjroebuck opened this issue Jul 23, 2015 · 4 comments
Open

props not being passed through to react component #10

cjroebuck opened this issue Jul 23, 2015 · 4 comments

Comments

@cjroebuck
Copy link

Using the react helper like in the readme, e.g. {{react componentName='mycomponent' foo=bar }} this.props.foo inside the react component is not set. Not working for Ember 1.13+.

@ggrillone
Copy link

Are you able to get it working at all with Ember 1.13+? Or just having issues with props. I can't seem to get it working at all due to js errors being thrown like: Uncaught TypeError: Cannot read property 'toUpperCase' of undefined

@ghempton
Copy link
Owner

It's highly possible some of the Ember internal's this depends upon have changed. Unfortunately I don't have the bandwidth to dig into this right now.

@ggrillone
Copy link

Digging into it a big, what I've found so far:

  • The type paramater in the autoGenerateWrapperClass function (React) is undefined, and it's trying to call toUpperCase() on type, which is why the error is occuring
  • Going a little deeper, looking into the ember-react code, specifically in the ReactComponent renderReact() function it is creating a variable reactClass, which to my knowledge so far is responsible for that type param that React uses. And inside of the renderReact function the reactClass variable is undefined

I'll post anything else if I uncover more

@ggrillone
Copy link

I ended up getting it working by not using jsx and opting for vanilla javascript in the react component.

Testing passing in props worked as well

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

3 participants