mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update docs
This commit is contained in:
parent
97096f8aff
commit
85b1127551
15 changed files with 200 additions and 298 deletions
|
|
@ -6,6 +6,9 @@ Strict mode is library-wide and can get set by doing:
|
|||
vide.strict = true
|
||||
```
|
||||
|
||||
It is automatically enabled when Vide is first required and not running in O2
|
||||
optimization level.
|
||||
|
||||
Strict mode is designed to help the development process by adding safety checks
|
||||
and identifying improper usage.
|
||||
|
||||
|
|
@ -15,8 +18,9 @@ Currently, strict mode will:
|
|||
2. Run effects twice when a source updates.
|
||||
3. Throw an error if yields occur where they are not allowed.
|
||||
4. Checks for `indexes()` and `values()` returning primitive values.
|
||||
5. Checks for duplicate nested properties at same depth.
|
||||
6. Better error reporting and stack traces + creation traces of property bindings.
|
||||
5. Checks for `values()` input having duplicate values.
|
||||
6. Checks for duplicate nested properties at same depth.
|
||||
7. Better error reporting and stack traces + creation traces of property bindings.
|
||||
|
||||
By rerunning sources and effects, any side-effects are made more apparent.
|
||||
This also helps ensure that cleanups are being handled correctly.
|
||||
|
|
@ -29,4 +33,5 @@ recording and better emitting stack traces where errors occur, particularly
|
|||
when binding properties to sources.
|
||||
|
||||
It is recommend to develop UI with strict mode and to disable it when pushing to
|
||||
production.
|
||||
production. In Roblox, production code compiles at O2 by default, so you don't
|
||||
need to worry about disabling strict mode unless you have manually enabled it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue