Can somebody explain to me the difference between the following two statements?
let test1 = new CustomComponent();
and
let test2 = <CustomComponent />
The debugger is Chrome gives me:
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…}
And how can I get a variable of type of test2, from of variable of the type of test1 ?