- Add a
callback
option to the axios instance for response transformation - Fix
cache.set
not returning the value - Fix issue with unobserving non-existent ids
- Upgrade to the new Context API
- Updated Action to set loading state to true when the action is triggered
- Migrate docs to
/docs
folder - Fix lint issues
- Remove logs
- Remove
/lib
folder and replace with npm prepare script
- Fixes an issue where repeat calls to a single data component could cause out of order renders
- Adds logging in dev ( TODO: replace with cross-repo logging solution )
- Changes lint rule for if / else blocks
- Switch to an in-memory store (from localstorage)
- Rename
data
=>action
for refetchActions
- Fix for initialization syntax
- Add garbage collection to StoreProvider and cache.js
- Ignore falsy / duplicate values for Data's onNext event
- Only keep existing cache key maxAge if valid and larger than specified
- Add Action component
- Add
api
prop to StoreProvider, which makes API available via context - Add context to actions called by Data
- Add 'remove' method to cache.js
- Add logic to respect existing
maxAge
s when setting the cache - Refactor axiosStore.js to accept a store or default to a new instance of cache.js
- Add a guard against undefined data updates
- Ensure refetch never hits the cache
- Add
cache.initializeStore()
to handle default store values - Add
initialValues
prop toStoreProvider
to leveragecache.initializeStore()
- Remove the
defaultValue
argument fromcache.get()
- Convert Boolean responses to objects with
value
property - Update docs and add cache docs
- Update dependencies
- Allow
null
maxAge to never expire a key
- Convert Number responses to objects with
value
property
- Convert String responses to objects with
value
property
- Convert array responses into objects with
results
arrays
- Add Data component
- Add StoreProvider for a centralized, observable application store
- Fix and upgrade ESLint
- Update docs
- Refactor placeholder from
{ loading: true }
tonull
- Refactor deps to use modular lodash
- Refactor cache promise signature
- Add axiosStore from usePF/axios-store-plugin
- Rename
perch-data
- Remove default export,
withData
is now a named export
- Fix
cache.clear()
to return a promise - Return
undefined
when the cache has no results for a given key
- Set
__fromCache = true
when returning results from cache - Return
null
when the cache has no results for a given key
- Add new
cache
utilities for working directly with the store (get
,getSync
,set
,clear
)
- BREAKING: Rename
fromCache
andcacheKey
to__fromCache
and__cacheKey
to prevent collisions with fetched data - Add support for pending actions #15
- Prefix cache entries with
withData__
- Add
optimisticUpdate()
to rerender with data
- Add
clearParams()
to nuke all appliedParams - Refactor for cleanliness
- Add
applyParams()
method for sorting, filtering, paginating, etc - Fix bug with
setState
callback (usingComponendDidUpdate
as temp fix) - Remove
goToPage()
in favor ofapplyParams()
- Refactor default cache maxAge to
1 second
- Add and remove support for cosmiconfig because of webpack issues
- Add
pollInterval
option for polling an entity until unmount - Fix caching issue
- Add caching via store.js
- Add entity-level cache configuration
- Refactor
withData()
to observe and re-render data from cache
- Create and release withData() HOC
- Add support for
refetch()
-ing data - Add
goToPage()
for paginating data - Add
loading
anderror
properties to each entity requested - Add docs