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 2657c42 commit 8ef184fCopy full SHA for 8ef184f
packages/react-mongo/README.md
@@ -48,9 +48,9 @@ import React from 'react'
48
import { useSubscription } from 'meteor/react-mongo'
49
50
const MyComponent = ({ id = null }) => {
51
- const subscription = useSubscription(() => (
52
- if (id) Meteor.subscribe(id)
53
- ), {
+ const subscription = useSubscription(() => {
+ if (id) return Meteor.subscribe(id)
+ }, {
54
deps: [id],
55
updateOnReady: false
56
})
0 commit comments