Skip to content

Commit

Permalink
feat: monorepo readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Aug 18, 2021
1 parent d301453 commit 7029776
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/README.md
46 changes: 46 additions & 0 deletions packages/dotto.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<h1 align="center">dotto.x</h1>

<img align="right" src="logo.png" width="200px" alt="dotto.x - lightweight state manager">

A tiny state manager for **React**
and vanilla JS. (other frameworks in future)
point changes

- **Lightweight.** Less than 485 bytes (minified and gzipped). Zero dependencies.
- **Easy but strong.** Simple working principe without magic, but with all features from big state managers.
- **Deep observable and fast.** You can subscribe and follow pinpoint changes without thinking about multiple re-renders.
- **Strong plugin system.** With plugins, you can enhance your store. Logging, undoing changes, connecting **Redux-devtools**, and anything else.
- **Tree Shakable.** All project splited by small modules.
- **Very strong TypeScript support.**
<hr>
<br>
<p align="center">
<a aria-label="NPM version" href="https://www.npmjs.com/package/dotto.x">
<img alt="" src="https://img.shields.io/npm/v/dotto.x.svg?style=for-the-badge&labelColor=000000">
</a>
<a aria-label="License" href="https://github.com/dottostack/dotto.x/blob/main/license.md">
<img alt="" src="https://img.shields.io/npm/l/dotto.x.svg?style=for-the-badge&labelColor=000000">
</a>
<a aria-label="Twitter" href="https://twitter.com/eddartdort">
<img alt="" src="https://img.shields.io/twitter/follow/eddartdort?labelColor=000000&color=1da1f2&label=Twitter&style=for-the-badge">
</a>
</p>
<br>

## How it works

```ts
import { createStore } from 'dotto.x'

const store = createStore({ some: { path: 0 } })

store.listen('some.path', (path, value) => {
// path - some.path
// value - 1,2
})

store.set('some.path', 1)
store.set('some.path', 2)
store.set('some.path', 'error') // type checks throw error, because 'some.path' most be a number.
```

0 comments on commit 7029776

Please sign in to comment.