Skip to content

Commit 32e87fb

Browse files
Update testing.md
added initialValue for useRef
1 parent 75d5ea8 commit 32e87fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guides/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export interface CounterStoreProviderProps {
348348
export const CounterStoreProvider = ({
349349
children,
350350
}: CounterStoreProviderProps) => {
351-
const counterStoreRef = useRef<CounterStoreApi>()
351+
const counterStoreRef = useRef<CounterStoreApi>(null)
352352
if (!counterStoreRef.current) {
353353
counterStoreRef.current = createCounterStore()
354354
}

0 commit comments

Comments
 (0)