8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31d4a49 commit c2cfd34Copy full SHA for c2cfd34
packages/shared/createInjectionState/index.ts
@@ -19,7 +19,7 @@ export function createInjectionState<Arguments extends Array<any>, Return>(
19
composable: (...args: Arguments) => Return,
20
options?: CreateInjectionStateOptions<Return>,
21
): readonly [useProvidingState: (...args: Arguments) => Return, useInjectedState: () => Return | undefined] {
22
- const key: string | InjectionKey<Return> = options?.injectionKey || Symbol('InjectionState')
+ const key: string | InjectionKey<Return> = options?.injectionKey || Symbol(composable.name || 'InjectionState')
23
const useProvidingState = (...args: Arguments) => {
24
const state = composable(...args)
25
provideLocal(key, state)
0 commit comments