fix: Flow not properly pre-loading state
* pass key to initFlow to possibly find a pre-existing state Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import useStore from './useStore'
|
||||
import useHooks from './useHooks'
|
||||
import { EmitFunc, FlowOptions, FlowStore } from '~/types'
|
||||
|
||||
export const initFlow = (emit: EmitFunc, store = useStore()) => {
|
||||
export const initFlow = (emit: EmitFunc, key?: string, store = useStore(undefined, key)) => {
|
||||
useHooks(store, emit)
|
||||
return store
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user