koota 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/dist/{chunk-4QEK6BHY.js → chunk-G375UJC5.js} +295 -288
- package/dist/index.cjs +267 -258
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/react.cjs +256 -259
- package/dist/react.d.cts +2 -4
- package/dist/react.d.ts +2 -4
- package/dist/react.js +7 -14
- package/dist/{world-DQXl4lI8.d.cts → world-BFj5O4_U.d.cts} +14 -3
- package/dist/{world-DQXl4lI8.d.ts → world-BFj5O4_U.d.ts} +14 -3
- package/package.json +3 -3
- package/react/index.cjs +256 -259
- package/react/index.d.cts +2 -4
- package/react/index.d.ts +2 -4
- package/react/index.js +7 -14
package/README.md
CHANGED
|
@@ -446,7 +446,15 @@ world.entities
|
|
|
446
446
|
const id = world.id()
|
|
447
447
|
|
|
448
448
|
// Resets the world as if it were just created
|
|
449
|
-
|
|
449
|
+
// Options can be passed in to modify the reset behavior
|
|
450
|
+
world.reset({
|
|
451
|
+
// Default false. If true, does not clear cached queries
|
|
452
|
+
preserveQueries: false
|
|
453
|
+
// Default false. If true, does not clear cached traits
|
|
454
|
+
preserveTraits: false
|
|
455
|
+
// Default false. If true, does not clear subscrptions, queries or traits
|
|
456
|
+
preserveSubscriptions: false
|
|
457
|
+
})
|
|
450
458
|
|
|
451
459
|
// Nukes the world and releases its ID
|
|
452
460
|
world.destroy()
|
|
@@ -647,7 +655,7 @@ return player ? (
|
|
|
647
655
|
|
|
648
656
|
### `useWorld`
|
|
649
657
|
|
|
650
|
-
Returns the
|
|
658
|
+
Returns the world held in context via `WorldProvider`.
|
|
651
659
|
|
|
652
660
|
```js
|
|
653
661
|
// Get the default world
|
|
@@ -663,7 +671,7 @@ useEffect(() => {
|
|
|
663
671
|
|
|
664
672
|
### `WorldProvider`
|
|
665
673
|
|
|
666
|
-
The provider for the world context. A world must be created and passed in
|
|
674
|
+
The provider for the world context. A world must be created and passed in.
|
|
667
675
|
|
|
668
676
|
```js
|
|
669
677
|
// Create a world and pass it to the provider
|