@girders-elements/core
Version:
Girders Elements is an architectural framework that assists with building data-driven apps with React or React Native.
32 lines (27 loc) • 705 B
JavaScript
export const types = {
read: '@@girders-elements/actions.read',
readRefresh: '@@girders-elements/actions.read.refresh',
setRefreshing: '@@girders-elements/actions.read.setRefreshing',
setRefreshMetadata: '@@girders-elements/actions.read.setRefreshMetadata',
setLoading: '@@girders-elements/actions.read.setLoading',
apply: '@@girders-elements/actions.read.apply',
fail: '@@girders-elements/actions.read.fail',
}
export function read(uri, opts) {
const defaults = {
revalidate: false,
}
return {
...defaults,
...opts,
uri,
type: types.read,
}
}
export function readRefresh(uri = undefined) {
return {
type: types.readRefresh,
uri,
}
}