]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: remove old code
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 26 Nov 2019 22:34:02 +0000 (23:34 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 26 Nov 2019 22:34:02 +0000 (23:34 +0100)
__tests__/ssr/app/main.ts
src/index.ts

index 96020e2dd0f3ce4dea2010843515d6f911b02927..fabda8610c97b93dd05eaf108339123b3a8e724b 100644 (file)
@@ -8,8 +8,8 @@ import { useStore, clear } from './store'
 
 export function createApp() {
   // create router and store instances
-  clear()
   const store = useStore()
+  store.reset()
 
   store.state.counter++
 
index fafbb23835c3b95301a7cea98a1af4116817e2c9..f92d7f00a6375253b94e1cd5ba6aedc206ad65ba 100644 (file)
@@ -58,10 +58,6 @@ export function createStore<
   // methods: Record<string | symbol, StoreMethod>
 ): CombinedStore<Id, S, G> {
   const state: Ref<S> = ref(buildState())
-  // TODO: do we need this?
-  function replaceState(newState: S) {
-    state.value = newState
-  }
 
   let isListening = true
   let subscriptions: SubscriptionCallback<S>[] = []