Today, I read that Hoc (High Order component) enables render hijacking, So I want to know what render hijacking is if anybody knows this concept please share here.
As Mr. Google says, "The concept of render hijacking is the ability to control what a component will output from another component". It actually means that you decorate your component by wrapping it into a Higher-Order component. By wrapping you can inject additional props or make other changes, which can cause changing logic of rendering. It does not actually "ENABLES" hijacking, but by using HOC you make your component behave in different way.
This article has a very good explanation
This other article elaborates on a possible use-case for applying that pattern
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With