seems complicated but shouldn't be

seems complicated but shouldn't be

People wonder why some things seem complicated, for example, in react. React is fairly unprincipled in its use of effects, but it works for most people and it helps build better UI.

The new react hooks use functions instead of classes to define components. That’s good. But as DanA points out, functions are different than classes and the differences can be subtle.

Since the concept and language of effects has not been around react for long, and the language is still evolving, you get into fairly big piles of goo when it comes time to explain things around effects.

Here’s an example article of where the language of effects, say as leveraged from category theory, might help be more precise:

Having said that, it is true that category theory vocabulary sounds scary and Dan was probably right in not using that language and instead used examples to illustrative his point, but you wind with alot of goo that could be made more precise at the expense of seeming erudite.

Oh well!


Popular posts from this blog

zio layers and framework integration

typescript and react types

dotty+scala.js+async: interesting options