Bot releases are hidden (Show)
Published by hazae41 over 1 year ago
Non breaking
Fixes
Published by hazae41 over 1 year ago
NO BREAKING CHANGE ✅
No new features or usage, lot of bugs were fixed but maybe new bugs arrived
Published by hazae41 over 1 year ago
BREAKING
useQuery
to useSchema
(or useScrollSchema
)useSingleQuery
to useQuery
NOT BREAKING
function getHello(socket?: WebSocket) {
if (!socket) return
return getSchema("hello", key => fetcher(key, socket))
}
Published by hazae41 over 1 year ago
BREAKING
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
error
is no longer typed, it is always unknown
, just like in a try-catch block// previously
useSingleSchema<Data, Error, Key>(key, fetcher, params)
// now
useSingleSchema<Data, Key>(key, fetcher, params)
serializer
and normalizer
are no longer allowed in global paramsany
typesPublished by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
BREAKING CHANGE
Result<D,E>
is now stricter, you can either have data
but no error
, or error
but no data
async function fetcher(url: string) {
// ✅
return { data: { name: "John Smith" } }
// ✅
return { error: new Error() }
// ❌
return { data: { name: "John Smith" }, error: new Error() }
}
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
moved test in another repo
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
Published by hazae41 almost 2 years ago
BREAKING CHANGES
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
}
Published by hazae41 about 2 years ago
Published by hazae41 about 2 years ago
NO BREAKING CHANGES
CHANGES
type: module
in package.jsonPublished by hazae41 about 2 years ago
CHANGES
realData
in States, Handles and Objects: it allows you to get the real, non-optimistic dataPublished by hazae41 about 2 years ago
Published by hazae41 about 2 years ago
CHANGES
user.update(async function* () {
yield { data: "Naive optimistic data" } // data that we create on-the-fly from what we suppose it will look like
const tx = await contract.doSomething(user.data) // make an Ethereum transaction
yield { data: getUserDataFromLogs(tx) } // data that we expect before the transaction is mined
const txr = await tx.wait() // wait for transaction mined
}, { timeout: 60 * 1000 })