docs: note key differences from reflex

This commit is contained in:
Richard 2024-05-31 00:50:29 -07:00
parent 5045798863
commit 7bbd7a0adb

View file

@ -23,6 +23,18 @@
> [!NOTE] > [!NOTE]
> The documentation is a work-in-progress! Please refer to the [examples](#🚀-examples) section for more information on how to use Charm. > The documentation is a work-in-progress! Please refer to the [examples](#🚀-examples) section for more information on how to use Charm.
## 🍀 Features
- ⚛️ **Manage state with _atoms_.** Decompose state into small, distinct containers called _atoms_, as opposed to combining them into a single store.
- 💪 **Minimal, yet powerful.** No concept of actions or middleware — write simple functions to read from and write to state.
- 🔬 **Immediate updates.** Listeners run asynchronously by default, avoiding the cascading effects of deferred updates and improving responsiveness.
- 🦄 **Like magic.** Selector functions can be subscribed to as-is — their memoization and dependencies are resolved for you.
---
## 📦 Setup ## 📦 Setup
Install Charm for roblox-ts using your package manager of choice. Install Charm for roblox-ts using your package manager of choice.
@ -40,6 +52,8 @@ Alternatively, add `littensy/charm` to your `wally.toml` file.
Charm = "littensy/charm@VERSION" Charm = "littensy/charm@VERSION"
``` ```
---
## 📚 API Reference ## 📚 API Reference
### Charm ### Charm
@ -74,6 +88,8 @@ Charm = "littensy/charm@VERSION"
#### `Server.hydrate(player)` #### `Server.hydrate(player)`
---
## 🚀 Examples ## 🚀 Examples
### Counter atom ### Counter atom