Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

89
Views
How can I compare two class components

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!