Menu

Asynchronous

ES6 generators make asynchronous flows easy lớn read, write, and kiểm tra. Create complex side effects without getting bogged down by the details.


Bạn đang xem: Menu

Composition-focused

Sagas enable numerous approaches khổng lồ tackling parallel execution, task concurrency, task racing, task cancellation, và more. Keep total control over the flow of your code.


Easy To Test

Assert results at each step of a generator or for a saga as a whole. Either way, side effect testing is quiông chồng, concise, and painless, as testing should be.


Xem thêm: See Hay Jewellery Company Limited Hay Limited Company Limited

Suppose we have a UI to fetch some user data from a remote server when a button is clicked. (For brevity, we'll just show the action triggering code.)


The component dispatches a plain object action to lớn the store. We'll create a Saga that watches for all USER_FETCH_REQUESTED actions & triggers an API Điện thoại tư vấn khổng lồ fetch the user data.


BackersSupport us with a monthly donation and help us continue our activities. Become a backer

*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

Sponsors

Become a sponsor và have your logo sản phẩm shown below và on Github with a link lớn your site. Become a sponsor