Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.

React transforms being run on Backbone views #78

Closed
solomon-gumball opened this issue Jan 27, 2016 · 6 comments
Closed

React transforms being run on Backbone views #78

solomon-gumball opened this issue Jan 27, 2016 · 6 comments

Comments

@solomon-gumball
Copy link

This issue seems to be closely related to #26

Basically I ran into this issue where I would get a TypeError in a Backbone constructor only when I was running our hot config. The constructor for this backbone view is on the prototype of another view and was being used like this:

const someView = new this.SomeViewConstructor();

Turns out the context in SomeViewConstructor was a proxiedMethod. Apparently this constructor is being wrapped by react-proxy even though this module did not export a react component.

@gaearon
Copy link
Owner

gaearon commented Jan 27, 2016

Can you show the relevant code?

@solomon-gumball
Copy link
Author

@gaearon So it's in a private repo but I made a more isolated case here: https://github.com/redwoodfavorite/react-backbone-hmr

I couldn't actually recreate the issue until I put a render method on the Backbone view!

@gaearon
Copy link
Owner

gaearon commented Jan 29, 2016

This looks like a problem with an overly broad check in https://github.com/gaearon/babel-plugin-react-transform. Can you please file it there? The best way to file it would be with a failing test but if you don't have time just creating the issue with a link to your project would be great.

@gaearon gaearon closed this as completed Jan 29, 2016
@mattijauhiainen
Copy link

We are having similar problem with ember. Opened an issue for it here #81

@gaearon
Copy link
Owner

gaearon commented Feb 18, 2016

I think I know what the problem is.
Fix is welcome: #84 (comment)

@gaearon
Copy link
Owner

gaearon commented Mar 4, 2016

Should be fixed in 2.0.1.

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

3 participants