meteor-utilities / react-list-container

Smart containers for React & Meteor
32 stars 8 forks source link

Why are terms forced to be an object? #4

Closed genyded closed 8 years ago

genyded commented 8 years ago

It seems like the subscription terms should allow any as the propType. Forcing an object might cause existing apps to have to rewrite their publications if they have strings and/or multiple values as args (terms). Not to mention Meteor supports and documents these as any...

Meteor.subscribe(name, [arg1, arg2...], [callbacks]) ddp-client/livedata_connection.js, line 480 Subscribe to a record set. Returns a handle that provides stop() and ready() methods.

Arguments name String Name of the subscription. Matches the name of the server's publish() call.

arg1, arg2... Any Optional arguments passed to publisher function on server.

callbacks Function or Object Optional. May include onStop and onReady callbacks. If there is an error, it is passed as an argument to onStop. If a function is passed instead of an object, it is interpreted as an onReady callback.

SachaG commented 8 years ago

Good point. PR welcome :)