I'm writing my own deep compare and I'm having trouble in comparing two variables that are class components meaning $$typeof: Symbol(react.element)
To better understand why I'm trying to do lets say I have
class MyComponent extends PureComponent {
render() {
return (
<div>
</div>
)
}
}
Now if
const a = <MyComponent/>
const b = <MyComponent/>
How to know a === b ?
What I mean by a === b is that if both a and b are from the same reference, for example if you want to detect props change and one of the props is a component, how can I know its the same one ?
Please note that I want to do this manually so I prefer to not use any comparison library