有人可以向我解释以下两个陈述之间的区别吗?
let test1 = new CustomComponent();
和
let test2 = <CustomComponent />
调试器是Chrome给我的:
for test1 CustomComponent {props: undefined,context: undefined,refs: Object,updater: Object,state: Object…} for test2 Object {$$typeof: Symbol(react.element),key: null,ref: null,props: Object,type: function…}
如何从test1类型的变量中获取test2类型的变量?