You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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 bypluginArgument
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.
The text was updated successfully, but these errors were encountered: