Skip to content

1.1.0 - The rename update

Compare
Choose a tag to compare
@hazae41 hazae41 released this 26 Oct 15:45
· 650 commits to master since this release

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
}