Skip to content

Commit d156940

Browse files
update README
1 parent ee47615 commit d156940

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
Small library which leverages the power of modern JavaScript to provide seamless way in creating stateful components with different purposes.
44

5+
> **Coroutines** are computer program components that generalize subroutines for nonpreemptive multitasking, by allowing multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, exceptions, event loop, iterators, infinite lists and pipes.
6+
> _[Wikipedia](https://en.wikipedia.org/wiki/Coroutine)_
7+
58
## Why
69

710
In the world full of APIs, we starting to forget the power of plain JavaScript and how essential patterns eliminate the need in providing new abstractions.
811

12+
The power of coroutines allows to write code in synchronous style and be able to pause it or partially postpone its execution. This essential idea brought us [Async Functions](https://github.com/tc39/ecmascript-asyncawait) which are already included in the language.
13+
914
This project tends to use the simplicity of functional React components and the essential mechanism of coroutines to create stateful components with colocation.
1015

1116
## Install
@@ -36,7 +41,7 @@ async function PostListCo() {
3641
export default Coroutine.create(PostListCo);
3742
```
3843

39-
### Dependency injection
44+
### Dependency Injection
4045

4146
For the sake of testability you might want to inject instances into your coroutine in the way how React `props` are provided.
4247

0 commit comments

Comments
 (0)