Issue #100

It’s already the 100th issue of Best of JavaScript’s newsletter, thank you for checking our rankings every week!

Number one this week, Crank.js is a framework to write UI components with JSX.

It’s inspired by React but it takes a totally different approach to handle side-effects. While React functional components can only be synchronous functions, components in Crank.js can be asynchronous functions (returning promises) or generator functions.

The introduction post explains well the motivation of the author: instead of relying of special features provided by the framework (like hooks and refs), it relies only on modern JavaScript features such as async await and generators.

Generator functions are used to create stateful components: instead of handling a state, the components can yield different output over time.

Also the use of function generator gives you access to all methods from component lifecycle:

  • a try finally block can be used to to fire code when a component un-mount
  • since this context provided by Crank.js is an async iterable of props, it’s possible to compare old and new props when a component updates.

For communication between components, it relies on the Custom Event API letting child components dispatch events that are handled by the parent components.

See you next week for the issue number 101!

Growing Fast This Week

By % of GitHub stars added (relative growth) this week
1
Crank.js
Crank.js
Write JSX-driven components with functions, promises and generators.
Homepage
+74.0%
2
Vime
Vime
All your media player needs in one place - a modern alternative to Videojs
Homepage
+43.4%
3
Destiny
Destiny
Prettier for File Structures
GitHub
+42.6%
4
OrbitDB
OrbitDB
Peer-to-Peer Databases for the Decentralized Web
GitHub
+20.5%
5
@compiled/css-in-js
@compiled/css-in-js
‍The CSS in JS authoring experience we love without the runtime cost.
Homepage
+20.1%
6
css.gg
css.gg
700+ Pure CSS, SVG & Figma UI Icons Available in SVG Sprite, styled-components...
Homepage
+10.7%
7
Neo.mjs
Neo.mjs
The webworkers driven UI framework
Homepage
+9.5%
8
Themer
Themer
Takes a set of colors and generates themes for your apps (editors, t...
Homepage
+9.0%
9
Frontity
Frontity
Create amazing sites using WordPress & React
Homepage
+8.9%
10
React Query
React Query
Hooks for fetching, caching and updating asynchronous data in React
GitHub
+7.6%

Trending This Week

By number of GitHub stars added this week
1
LearnGitBranching
LearnGitBranching
An interactive git visualization to challenge and educate!
Homepage
+828
2
OrbitDB
OrbitDB
Peer-to-Peer Databases for the Decentralized Web
GitHub
+714
3
Destiny
Destiny
Prettier for File Structures
GitHub
+661
4
Vue.js
Vue.js
A progressive, incrementally-adoptable framework for building UI on the web
Homepage
+646
5
JS Algorithms & Data Structures
JS Algorithms & Data Structures
Algorithms and data structures implemented in JavaScript
GitHub
+641
6
Crank.js
Crank.js
Write JSX-driven components with functions, promises and generators.
Homepage
+576
7
React Query
React Query
Hooks for fetching, caching and updating asynchronous data in React
GitHub
+460
8
Vue Element Admin
Vue Element Admin
A magical vue admin
GitHub
+433
9
React
React
A declarative, efficient, and flexible JavaScript library for building UI
Homepage
+403
10
Tailwind CSS
Tailwind CSS
A utility-first CSS framework for rapid UI development.
Homepage
+381

Any question or feedback? Reach us on GitHub.

Best of JavaScript is a project created by Michael Rambeau, made in Osaka, Japan.