Major front-end frameworks such as React are getting more complex as they continue to add features. The added complexity is visible in the additional tooling, syntax and ecosystem that comes together with these frameworks.
Part of that complexity comes from the fact that large frameworks need to maintain a high level of backward compatibility and stability due their large amount of users. As such, they have an incentive to not revisit key design choices.
Crank revisits a key architectural part of React-like frameworks that dictates render functions to be pure functions. Instead, Crank leverages asynchronous generators to perform asynchronous rendering for free. Asynchronous generators are a standard language feature of JavaScript and do not carry the cost of a library implementing the functionality.
Working with the generators baked in the language and the async/await syntax allows developers to handle asynchronous tasks (fetching remote data, suspending and resuming rendering) as naturally as synchronous ones. The number of concepts to master to implement a front-end application that are foreign to the language decreases.

#javascript libraries #javascript #dynamic languages #languages #async-await #web development #programming #asynchronous programming #architecture & design #development #article

Crank, a New Front-End Framework with  Baked-In Asynchronous Rendering
1.80 GEEK