Skip to content

Commit 140cdb8

Browse files
author
Brian Vaughn
committed
Add return type to useSubscription
1 parent a4ce2f4 commit 140cdb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-hooks/src/useSubscription.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function useSubscription<Value, Source>({
2929
source: Source,
3030
getCurrentValue: (source: Source) => Value,
3131
subscribe: (source: Source, callback: Function) => () => void,
32-
|}) {
32+
|}): Value {
3333
// Read the current value from our subscription source.
3434
// When this value changes, we'll schedule an update with React.
3535
// It's important to also store the source itself so that we can check for staleness.

0 commit comments

Comments
 (0)