New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(reducers): cache reducer for increased performance - @puppybits #335
Conversation
chore(cache-reducer): include id & parent path as prep work
This effectively deprecated the need for both the dataReducer and the orderedReducer. The cache reducer also moves the populate functionality to run when the action is triggered, instead of in the selector. It also adds a 'fields' property on the query to reduce react over-rendering by ignoring unused data in the view.
feat(cache-reducer): added new reducer for instant mutation changes
…ux-firestore into feature/immediate-mode-mutate
feature(immediate-mode): support for custom firestore.mutate with cache reducer
# Conflicts: # src/reducers/cacheReducer.js
perf: fast redux
fix: pagination and optimistic write creation
fix: run pagination in optimistic writes
Thanks so much for these amazing changes, the tests, and keep an eye on keeping changes backwards compatible - apologies it took so long to get these in. Cycles should be shorter moving forward |
I've noticed a few things which I addressed including eslint warnings/errors. Working on cleaning up in the v0.16.0 PR before releasing which includes
One of the new tests is failing though, so I'll need to debug a bit more: https://github.com/prescottprue/redux-firestore/runs/4296991419?check_suite_focus=true#step:6:423 |
…431) * feat(reducers): cache reducer for increased performance - @puppybits (#335) * feat(core): add mutate method for easier transactions - @puppybits * feat(core): add lodash module replacement webpack plugin - @puppybits * feat(core): replace uglify webpack plugin with terser webpack plugin - @puppybits * feat(build): add `firebase/firestore` as a webpack an external (improves UMD bundle size by not including Firestore SDK bundle) BREAKING CHANGES Firebase peer dependency now set to ^9 (previously ^8)
This fixes massive performance issues we had using both Firestore & redux-firestore in production. Running a transaction update must round-trip to the server before being reflected in Redux. The mutate + cache reducer allows changes to be reflected in redux synchronously with no additional work.
There are no breaking changes. But it does adds
id
&path
properties to all results. Mostly it add the new cache reducer for synchronous optimistic updates. And it adds a new mutate function which the cache reducer uses to reflect changes synchronously.Description
Check List
If not relevant to pull request, check off as complete
Relevant Issues