mirror of
https://github.com/littensy/charm.git
synced 2026-10-23 05:46:27 +00:00
docs: add dev flag
This commit is contained in:
parent
b9d576c876
commit
9965613507
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
|
@ -391,6 +391,18 @@ remotes.requestState.connect((player) => {
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 🚧 Development
|
||||||
|
|
||||||
|
Charm provides a debug mode to help you identify potential bugs in your project. To enable debug mode, set the global `_G.__DEV__` flag to `true`.
|
||||||
|
|
||||||
|
Currently, the debug flag enables the following checks:
|
||||||
|
|
||||||
|
- Molecules, listeners, and batched functions are not allowed to yield, and will throw an error if they do.
|
||||||
|
|
||||||
|
- Server state is validated before sending to clients. If the state is not serializable, an error will be thrown. A list of common cases can be found in the [source code](src/__tests__/sync/validate.spec.luau).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🚀 Examples
|
## 🚀 Examples
|
||||||
|
|
||||||
### Counter atom
|
### Counter atom
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue