How to sync Pouchdb with Sencha Touch?

318 views Asked by At

I will have a Couchdb periodically syncing with the Pouchdb in the browser.
What I want to do is to display documents on a Sencha Touch 2 + Phonegap application.

Specifically (at least for right now), I want to display them in a list, where each list item is one document field.

For instance, if I have the documents:

[{
    '_id': 'doc1',
    'name': 'Name1'
},
{
    '_id': 'doc2',
    'name': 'Name2'
}]

I might want the list items to be ["Name1", "Name2"].

How would this be done? Must I first sync with a store, or can I bypass them entirely?

Update:

One solution was to send PouchDB documents to a JSON file and then load the JSON into the store. However, I'm still wondering if there's a better approach - ideally replacing PouchDB -> JSON -> Store -> List with PouchDB -> List.

Perhaps my question above ("can I bypass them entirely") was misguided. I believe I need a store if I want to display that data.

0

There are 0 answers