You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same as [ListView](https://facebook.github.io/react-native/docs/listview.html) Component but does not need dataSource and accepts three arguments :
221
220
222
-
-`collection`**string***required*
223
-
-`selector`[**string** / **object**]
224
-
-`options`**object**
225
-
-`listViewRef`[**string** / **function**] ref to ListView component.
226
-
221
+
*`collection`**string**_required_
222
+
*`selector`[**string** / **object**]
223
+
*`options`**object**
224
+
*`listViewRef`[**string** / **function**] ref to ListView component.
227
225
228
226
### Example usage
229
227
230
228
```javascript
231
229
<MeteorListView
232
230
collection="todos"
233
-
selector={{done:true}}
234
-
options={{sort: {createdAt:-1}}}
231
+
selector={{done:true}}
232
+
options={{sort: {createdAt:-1 } }}
235
233
renderRow={this.renderItem}
236
234
//...other listview props
237
235
/>
@@ -241,14 +239,16 @@ Same as [ListView](https://facebook.github.io/react-native/docs/listview.html) C
241
239
242
240
Same as [ListView](https://facebook.github.io/react-native/docs/listview.html) Component but does not need dataSource and accepts one argument. You may need it if you make complex requests combining multiples collections.
243
241
244
-
-`elements`**function***required* : a reactive function which returns an array of elements.
245
-
-`listViewRef`[**string** / **function**] ref to ListView component.
242
+
*`elements`**function**_required_ : a reactive function which returns an array of elements.
243
+
*`listViewRef`[**string** / **function**] ref to ListView component.
@@ -259,9 +259,11 @@ Same as [ListView](https://facebook.github.io/react-native/docs/listview.html) C
259
259
## Meteor Collections
260
260
261
261
### Meteor.subscribe
262
+
262
263
[Meteor.subscribe()](http://docs.meteor.com/#/full/meteor_subscribe) returns an handle. If the component which called subscribe is unmounted, the subscription is automatically canceled.
263
264
264
265
### Meteor.collection(collectionName, options)
266
+
265
267
You need pass the `cursoredFind` option when you get your collection if you want to use cursor-like method:
Or you can simply use `find()` to get an array of documents. The option default to false for backward compatibility. Cursor methods are available to share code more easily between a react-native app and a standard Meteor app.
272
274
273
-
274
275
## Meteor DDP connection
275
276
276
277
### Meteor.connect(endpoint, options)
277
278
278
279
Connect to a DDP server. You only have to do this once in your app.
279
280
280
-
*Arguments*
281
+
_Arguments_
281
282
282
-
-`url`**string***required*
283
-
-`options`**object** Available options are :
284
-
- autoConnect **boolean**[true] whether to establish the connection to the server upon instantiation. When false, one can manually establish the connection with the Meteor.ddp.connect method.
285
-
- autoReconnect **boolean**[true] whether to try to reconnect to the server when the socket connection closes, unless the closing was initiated by a call to the disconnect method.
286
-
- reconnectInterval **number**[10000] the interval in ms between reconnection attempts.
283
+
*`url`**string**_required_
284
+
*`options`**object** Available options are :
285
+
* autoConnect **boolean**[true] whether to establish the connection to the server upon instantiation. When false, one can manually establish the connection with the Meteor.ddp.connect method.
286
+
* autoReconnect **boolean**[true] whether to try to reconnect to the server when the socket connection closes, unless the closing was initiated by a call to the disconnect method.
287
+
* reconnectInterval **number**[10000] the interval in ms between reconnection attempts.
287
288
288
289
### Meteor.disconnect()
289
290
@@ -298,7 +299,8 @@ Disconnect from the DDP server.
298
299
299
300
## Availables packages
300
301
301
-
### Convenience packages
302
+
### Convenience packages
303
+
302
304
Example `import { composeWithTracker } from 'react-native-meteor';``
303
305
304
306
* EJSON
@@ -310,7 +312,6 @@ Example `import { composeWithTracker } from 'react-native-meteor';``
310
312
311
313
See [documentation](https://atmospherejs.com/meteor/reactive-dict).
312
314
313
-
314
315
### Meteor.Accounts
315
316
316
317
`import { Accounts } from 'react-native-meteor';``
@@ -339,6 +340,7 @@ import { FSCollectionImagesPreloader } from 'react-native-meteor';
339
340
### Meteor.ddp
340
341
341
342
Once connected to the ddp server, you can access every method available in [ddp.js](https://github.com/mondora/ddp.js/).
343
+
342
344
* Meteor.ddp.on('connected')
343
345
* Meteor.ddp.on('added')
344
346
* Meteor.ddp.on('changed')
@@ -349,6 +351,7 @@ Once connected to the ddp server, you can access every method available in [ddp.
349
351
## react-native-router-flux
350
352
351
353
* You can use Switch with createContainer. Example :
354
+
352
355
```javascript
353
356
componentWillMount() {
354
357
this.scenes=Actions.create(
@@ -381,7 +384,6 @@ Once connected to the ddp server, you can access every method available in [ddp.
0 commit comments