Skip to content

Commit 269205f

Browse files
DevilTeaposva
andauthored
docs(store): $dispose doesn't delete store state (#1824)
Co-authored-by: Eduardo San Martin Morote <[email protected]> Close #1821
1 parent 12d9d38 commit 269205f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/pinia/src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ export interface _StoreWithState<
410410
* Stops the associated effect scope of the store and remove it from the store
411411
* registry. Plugins can override this method to cleanup any added effects.
412412
* e.g. devtools plugin stops displaying disposed stores from devtools.
413+
* Note this doesn't delete the state of the store, you have to do it manually with
414+
* `delete pinia.state.value[store.$id]` if you want to. If you don't and the
415+
* store is used again, it will reuse the previous state.
413416
*/
414417
$dispose(): void
415418

0 commit comments

Comments
 (0)