Skip to content

Commit

Permalink
docs: Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mnasyrov committed Aug 2, 2021
1 parent 6526092 commit 67ed094
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Reactive state and effect management with RxJS.

## Overview

The library provides a way to declare actions and effects, states and stores. The core package is framework-agnostic which can be used independent in libraries, web and node.js apps, including micro-frontends architecture.
The library provides a way to declare actions and effects, states and stores. The core package is framework-agnostic which can be used independently in libraries, backend and frontend apps, including micro-frontends architecture.

The library is inspired by [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller), [RxJS](https://github.com/ReactiveX/rxjs), [Akita](https://github.com/datorama/akita) and [Effector](https://github.com/effector/effector).

Expand All @@ -50,7 +50,15 @@ Please find the full documentation by the links below.
npm install rx-effects rx-effects-react --save
```

## Usage Example
## Usage

### Concepts

`// TODO`

### Example

Below is an implementation of the pizza shop, which allows order pizza from the menu and to submit the cart. The controller orchestrate the state store and side effects. The component renders the state and reacts on user events.

```ts
// pizzaShop.ts
Expand Down
5 changes: 5 additions & 0 deletions packages/rx-effects/src/action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Observable, Subject } from 'rxjs';

/**
* Action is an event emitter
* @field event$ - Observable for emitted events.
*/
export type Action<Event> = {
readonly event$: Observable<Event>;
(event: Event): void;
Expand Down

0 comments on commit 67ed094

Please sign in to comment.