Skip to content

Instantly share code, notes, and snippets.

@devel-pa
devel-pa / GunMiddleware.js
Last active May 11, 2017 07:13
Redux middleware for GunDB. Low perfomance. Supports arrays.
/**
* Created by Paul on 10/7/2016.
* GunDB v0.3
* inspired by https://github.com/pgte/pouch-redux-middleware
* TODO: issue: stores duplicates in an object path.docs for removing redundant operations
* - can be implemented with redux history, but same lot of data
* - checking with gun, don't know how, yet
* - another method is eventually to store timestamps (updated_at) in redux and only that in path.docs
* TODO: issue: not quite async as it should be in certain areas
*/