1. 18

  2. 4

    It’s interesting to read about different concepts in this space and I like this one from a first glance. I probably won’t use it because I am not an early adopter of these kinds of frameworks and am quite happy with React.

    React team held and continues to hold, that “[rendering] should be pure, meaning that it does not modify component state, it returns the same result each time it’s invoked, and it does not directly interact with the browser”. Async functions, which are really just functions which return promises, were excluded by definition. Why? Because promises are stateful and therefore “impure.”

    If you read the linked Github thread you see that generators and promises were excluded, not for some moral concept of “purity” but because making rendering stateful would mean taking a performance hit. They can’t be memoized and React makes heavy use of memoization.