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 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
- world.reset()
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 default world. If a world is passed in via `WorldProvider` then this is returned instead. The default world can be gotten at any time with `getDefaultWorld`.
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, which then overrides the default world.
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