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

Relaxing jsx restrictions #11

Open
guybedford opened this issue Apr 25, 2015 · 1 comment
Open

Relaxing jsx restrictions #11

guybedford opened this issue Apr 25, 2015 · 1 comment

Comments

@guybedford
Copy link

You mentioned the restrictions on ES6, naming and defaults, just wanted to touch on these.

For naming, is there a reason you can't key the __jsxHot object entirely by pluginArgument as that is a completely unique identifier?

For the exports - perhaps it is possible to iterate the different exports on the export object, to see if one is a React class, perhaps via obj instanceof React.Component? I'm sure there are lots of other ways out there to do this as well. That would cover the default and any others.

Then I'm still not quite sure I follow why we are restricted to ES6 modules for these JSX components as well.

@guybedford
Copy link
Author

About hot-reloading only working when the component is the default export - I get it that we can't iterate the module exports from within the module which isn't ideal. Will put some thought to that.

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

1 participant