Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #191, closes #179.
Motivation
Make sites faster.
Solution
Partial updates
Optimistic create with eager updates
This lets you eagerly insert into a list.
You'll need to make a fake id that won't collide so it can put it in the cache somewhere.
Race conditions
Since optimistic updates are applied after all realized updates, all optimistic updates with a date equal to or before the currently realizing update should be removed. Note: this still potentially creates a problem when multiple endpoints interact on the same entity, but there is no clear way to realize that solution and this problem is far less likely. Mostly the expected issue is toggling a single control over quickly.
Update NetworkManager detection mechanism
Since we're now passing
fetch
actions through to the reducer to handle, we need a new mechanism to detect if NetworkManager isn't setup. This is a common error for those attempting to use redux.We will add a flag to the meta named
nm
that is set to true when the action passes through NetworkManager.