New to the concept of HOC? Or having trouble understanding what HOC is and when to use it? Well, don’t worry! We will explore the concept of HOC with a real-life analogy and also with a coding example later in this post.
Have you ever seen a popcorn popper? You put in a corn kernel; a lot happens to it behind the scenes; and what comes out is a POPCORN!
A Higher Order Component (HOC) is nothing but a POPCORN POPPER! A corn kernel goes in and a POPCORN comes out!