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
When attempting to extend FluxContainer and create a class from it on the server side in Node v6.x, the component throws an error when instantiated:
TypeError: Class constructor OverviewComponent cannot be invoked without 'new'
at PureFluxContainerClass.FluxContainerClass (/ProjectLocation/node_modules/flux/lib/FluxContainer.js:50:13)
The component looks like this:
class OverviewComponent extends React.Component {
...
}
module.exports = Flux.Container.create(OverviewComponent);
Note that this is not transpiled - this is executed natively with Node v6.x's ES6 support.
I believe this error is because Flux is expecting the component to be transpiled to ES5, and therefore be able to call the constructor be calling it directly, which it can't do in ES6. Is this correct?
Hi,
When attempting to extend FluxContainer and create a class from it on the server side in Node v6.x, the component throws an error when instantiated:
The component looks like this:
Note that this is not transpiled - this is executed natively with Node v6.x's ES6 support.
I believe this error is because Flux is expecting the component to be transpiled to ES5, and therefore be able to call the constructor be calling it directly, which it can't do in ES6. Is this correct?