-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from futursolo/book
Add Bounce Docs
- Loading branch information
Showing
8 changed files
with
740 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ crates/*/target | |
examples/*/target | ||
examples/*/dist | ||
|
||
book-build | ||
|
||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Introduction | ||
|
||
<p style="text-align: center; font-size: 2rem;">Bounce</p> | ||
|
||
<p style="text-align: center;"> | ||
<a href="https://crates.io/crates/bounce"> | ||
<img src="https://img.shields.io/crates/v/bounce" alt="crates.io"> | ||
</a> | ||
| | ||
<a href="https://docs.rs/bounce/"> | ||
<img src="https://docs.rs/bounce/badge.svg" alt="docs.rs"> | ||
</a> | ||
| | ||
<a href="https://github.com/futursolo/bounce"> | ||
<img src="https://img.shields.io/github/stars/futursolo/bounce?style=social" alt="GitHub"> | ||
</a> | ||
</p> | ||
|
||
Bounce is a state-management library focusing on simplicity and | ||
performance. | ||
|
||
Bounce is inspired by [Redux](https://github.com/reduxjs/redux) and | ||
[Recoil](https://github.com/facebookexperimental/Recoil). | ||
|
||
## Rationale | ||
|
||
Yew state management solutions that are currently available all have | ||
some (or all) of the following limitations: | ||
|
||
- Too much boilerplate. | ||
|
||
Users either have to manually control whether to notify | ||
subscribers or have to manually define contexts. | ||
|
||
- State change notifies all. | ||
|
||
State changes will notify all subscribers. | ||
|
||
- Needless clones. | ||
|
||
A clone of the state will be produced for all subscribers whenever | ||
there's a change. | ||
|
||
Bounce wants to be a state management library that: | ||
|
||
- Has minimal boilerplate. | ||
|
||
Changes are automatically detected via `PartialEq`. | ||
|
||
- Only notifies relevant subscribers. | ||
|
||
When a state changes, only hooks that subscribe to that state will | ||
be notified. | ||
|
||
- Reduces Cloning. | ||
|
||
States are `Rc`'ed. | ||
|
||
## Installation | ||
|
||
If you have [`cargo-edit`](https://github.com/killercup/cargo-edit) | ||
installed, | ||
you can add it to your project with the following command: | ||
|
||
```shell | ||
cargo add bounce | ||
``` | ||
|
||
You can also add it to the `Cargo.toml` of your project manually: | ||
|
||
```toml | ||
bounce = "0.3" | ||
``` | ||
|
||
## Getting Started | ||
|
||
If you want to learn more about Bounce, you can check out the | ||
[tutorial](./tutorial.md) and the [API documentation](https://docs.rs/bounce/). | ||
|
||
## Licence | ||
|
||
Bounce is dual licensed under the MIT license and the Apache License (Version 2.0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SUMMARY | ||
|
||
# Getting Started | ||
|
||
- [Introduction](./README.md) | ||
- [Tutorial](./tutorial.md) | ||
|
||
# Reference | ||
|
||
- [Core API](./core-api.md) | ||
- [Helmet API](./helmet-api.md) | ||
- [Query API](./query-api.md) |
Oops, something went wrong.