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
feat: make applyDocumentActions more similar to the rest
`applyDocumentActions` was the only function in the `core` package which
interpreted the `SanityInstance` as a tree, automatically traversing the
tree to find a matching instance. This is inconsistent with the other
stores (e.g. query store) which assumes that it's being called with the
right instance.
In addition, this changes `applyDocumentActions` to only accept actions
as an array (so we don't have to check if it's an array or not) and also
it places the `actions` as part of option. This is consistent with e.g.
`getQueryState` which has a required `query` field in its options.
This now means that all functions which are wrapped in
`bindActionByDataset` are now consistently getting passed an object as
their first argument. This is going to be key so that we later can
modify this function to consider the options (instead of the instance).
There should be no breaking changes in the React package.
0 commit comments