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
I have been working on a version of this module that allows some properties of a reducer's state to be saved in an attachment rather than in the document. The original reason for this was I needed to store binary data over 5MB in size. It was going to be implemented as
The state's .image and .rawData properties would then be saved to PouchDB as two different attachments on the reducer's document. However, after thinking about the design, I have decided that the data would not be changed enough to store it actively in the Redux store. Instead it will be attached to the reducer's document by an Redux-Thunk action creator. Then a 'path' to it in pouchDB will be stored in Redux. When a element needs the data it can use the 'path' in Redux to get it from PouchDB.
Does anyone see a use for supporting attachments in this module? I could create a formal implementation of the process described above, but I don't know how the interaction between the action creator, the store, the reducer, and selectors would work. Any thoughts?
By 'path' I mean some type of small data structure that describes what a PouchDB.get() command should retrieve.
The text was updated successfully, but these errors were encountered:
konnorandrews
changed the title
Support for PouchDB attachments
[Question] Support for PouchDB attachments
Jul 17, 2017
I have been working on a version of this module that allows some properties of a reducer's state to be saved in an attachment rather than in the document. The original reason for this was I needed to store binary data over 5MB in size. It was going to be implemented as
The state's
.image
and.rawData
properties would then be saved to PouchDB as two different attachments on the reducer's document. However, after thinking about the design, I have decided that the data would not be changed enough to store it actively in the Redux store. Instead it will be attached to the reducer's document by an Redux-Thunk action creator. Then a 'path' to it in pouchDB will be stored in Redux. When a element needs the data it can use the 'path' in Redux to get it from PouchDB.Does anyone see a use for supporting attachments in this module? I could create a formal implementation of the process described above, but I don't know how the interaction between the action creator, the store, the reducer, and selectors would work. Any thoughts?
By 'path' I mean some type of small data structure that describes what a
PouchDB.get()
command should retrieve.The text was updated successfully, but these errors were encountered: