Releases: hazae41/glacier
Releases · hazae41/glacier
1.1.8 - Stricter Result
BREAKING CHANGE
Result<D,E>
is now stricter, you can either havedata
but noerror
, orerror
but nodata
async function fetcher(url: string) {
// ✅
return { data: { name: "John Smith" } }
// ✅
return { error: new Error() }
// ❌
return { data: { name: "John Smith" }, error: new Error() }
}
1.1.6 - Added React Native example
- added Expo (React Native) example
1.1.5
1.1.4
1.1.2 - The sandbox update
- Added CodeSandbox
1.1.0 - The rename update
BREAKING CHANGES
- Renamed "Handle" to "Query"
- Renamed "Object" to "Instance"
- Renamed "use" to "useQuery"
- Renamed "single" to "getSingleSchema"
- Renamed "scroll" to "getScrollSchema"
- Renamed "useSingle" to "useSingleQuery"
- Renamed "useScroll" to "useScrollQuery"
XSWR.
is no longer needed (but still works)
Schemas become:
function getHelloSchema() {
return getSingleSchema<Hello>("/api/hello", fetchAsJson)
}
Mixtures become:
function useAutoFetchMixture(query: Query) {
useFetch(query)
useVisible(query)
useOnline(query)
}
Mixes become:
function useHelloMix() {
const query = useQuery(getHelloSchema, [])
useAutoFetchMixture(query)
return query
}
1.0.95 - The second bundle update
NO BREAKING CHANGES
CHANGES
- Removed bunchee in favor of rollup => less bugs
- No longer bundled/minified => easier debugging
- Added source maps => easier debugging
- Moved tslib as peerDependency => reduced bundle size
1.0.89 - The bundle update
NO BREAKING CHANGES
CHANGES
type: module
in package.json- moved react as a peerDependency => reduced bundle size
1.0.86 - The real update
CHANGES
- Updaters now yield Result instead of State: only allows data, error, and times (e.g. can't modify aborter in yield)
- Added new member
realData
in States, Handles and Objects: it allows you to get the real, non-optimistic data
1.0.85 - The update
- Updated deps
- Cleaned tsconfig
- Commits and releases are now GPG signed