1 parent 35984ff commit 4b02767Copy full SHA for 4b02767
1 file changed
src/proxy/utils.js
@@ -31,18 +31,17 @@ export const doesSupportClasses = (function() {
31
}
32
})()
33
34
-const ES6ProxyComponentFactory =
35
- doesSupportClasses &&
+const ES6ProxyComponentFactory = (InitialParent, postConstructionAction) =>
36
indirectEval(`
37
(function(InitialParent, postConstructionAction) {
38
- return class ProxyComponent extends InitialParent {
+ return class ${InitialParent.name || 'HotComponent'} extends InitialParent {
39
constructor(props, context) {
40
super(props, context)
41
postConstructionAction.call(this)
42
43
44
})
45
-`)
+`)(InitialParent, postConstructionAction)
46
47
const ES5ProxyComponentFactory = function(
48
InitialParent,
0 commit comments