Functional approach to React components (getting rid of `this`)
I don’t like this. I mean I don’t like this.
One example is inheritance. Even Java folks know the Composition over Inheritance rule (thanks to J. Bloch?) and React team explicitly states this as well.
this, which is hard to deal with and which is known for making the code flow particularly tangled and messy.
OK, enough grumbling for now.
I want to share a simple trick I’ve started using recently while developing one of my personal projects. It’s very simple. It abstracts away the...
Continue reading →