Hi,
I consider myself still a JS beginner (lots of head knowledge but not much practice)... Here's what I'm trying to do: I'm trying to integrate PouchDB into a synchronous (react + flux) app and I'm not sure how to handle the async (delayed) return of a doc.
I've put my PouchDB logic in a cjs module, and it is returning the contents of a doc in my db. However, I'm not sure how to make the synchronous part of my app get the contents of the doc stored into a variable - it's always coming up 'undefined'. How do I receive the result of PouchDB's promise in my app?
Many thanks,
~Jay