{"kind":"markdown","meta":{"entryType":"library","name":"ky","title":"ky","slug":"ky","description":"Small Fetch-based HTTP client for browser and server code.","shortDescription":"Small Fetch-based HTTP client for browser and server code.","category":"data-fetching","compatibilityStatus":"native","typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","tags":["http","fetch"],"packageName":"ky","npmUrl":"https://www.npmjs.com/package/ky","installCommand":"npm install ky","islands":true,"esm":true,"library":{"name":"ky","slug":"ky","shortDescription":"Small Fetch-based HTTP client for browser and server code.","category":"data-fetching","categories":["data-fetching"],"packageName":"ky","npmUrl":"https://www.npmjs.com/package/ky","compatibilityStatus":"native","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install ky","tags":["http","fetch"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/ky","file":"entries/ky.md","description":"Small Fetch-based HTTP client for browser and server code.","compatibility":"native","status":"recommended","typescript":true,"ssr":true},"libraryAlternatives":[],"relatedProjects":[{"name":"ofetch","slug":"ofetch","shortDescription":"Universal fetch wrapper that stays independent of UI frameworks.","category":"data-fetching","categories":["data-fetching"],"packageName":"ofetch","npmUrl":"https://www.npmjs.com/package/ofetch","compatibilityStatus":"native","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install ofetch","tags":["http","fetch"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/ofetch","file":"entries/ofetch.md","description":"Universal fetch wrapper that stays independent of UI frameworks.","compatibility":"native","status":"recommended","typescript":true,"ssr":true},{"name":"Axios","slug":"axios","shortDescription":"Popular promise-based HTTP client independent of Preact.","category":"data-fetching","categories":["data-fetching"],"packageName":"axios","npmUrl":"https://www.npmjs.com/package/axios","compatibilityStatus":"native","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install axios","tags":["http","client"],"islands":true,"esm":false,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/axios","file":"entries/axios.md","description":"Popular promise-based HTTP client independent of Preact.","compatibility":"native","status":"recommended","typescript":true,"ssr":true},{"name":"graphql-request","slug":"graphql-request","shortDescription":"Minimal framework-independent GraphQL request client.","category":"data-fetching","categories":["data-fetching"],"packageName":"graphql-request","npmUrl":"https://www.npmjs.com/package/graphql-request","compatibilityStatus":"native","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install graphql-request","tags":["graphql","http"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/graphql-request","file":"entries/graphql-request.md","description":"Minimal framework-independent GraphQL request client.","compatibility":"native","status":"recommended","typescript":true,"ssr":true},{"name":"@tanstack/query-core","slug":"tanstack-query-core","shortDescription":"Framework-agnostic async state and cache core from TanStack Query.","category":"data-fetching","categories":["data-fetching"],"packageName":"@tanstack/query-core","npmUrl":"https://www.npmjs.com/package/%40tanstack%2Fquery-core","compatibilityStatus":"native","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install @tanstack/query-core","tags":["query","cache","core"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/tanstack-query-core","file":"entries/tanstack-query-core.md","description":"Framework-agnostic async state and cache core from TanStack Query.","compatibility":"native","status":"recommended","typescript":true,"ssr":true},{"name":"Apollo Client","slug":"apollo-client","shortDescription":"Full-featured GraphQL client usually used through React compatibility.","category":"data-fetching","categories":["data-fetching"],"packageName":"@apollo/client","npmUrl":"https://www.npmjs.com/package/%40apollo%2Fclient","compatibilityStatus":"compat","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install @apollo/client","tags":["graphql","cache"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/apollo-client","file":"entries/apollo-client.md","description":"Full-featured GraphQL client usually used through React compatibility.","compatibility":"compat","status":"stable","typescript":true,"ssr":true},{"name":"SWR","slug":"swr","shortDescription":"Data fetching with stale-while-revalidate semantics and a small API surface.","category":"data-fetching","categories":["data-fetching"],"packageName":"swr","repositoryUrl":"https://github.com/vercel/swr","npmUrl":"https://www.npmjs.com/package/swr","documentationUrl":"https://swr.vercel.app","homepageUrl":"https://swr.vercel.app","license":"MIT","compatibilityStatus":"unverified","testedPreactVersions":[],"typescriptSupport":"native","ssrSupport":"supported","maintenanceStatus":"active","installCommand":"npm install swr","alternatives":["tanstack-query"],"tags":["data-fetching","caching","hooks"],"islands":true,"esm":true,"qualityBadges":[],"catalogDomain":"preact","route":"/libraries/swr","file":"entries/swr.md","description":"Data fetching with stale-while-revalidate semantics and a small API surface.","compatibility":"unknown","status":"stable","typescript":true,"ssr":true,"repository":"https://github.com/vercel/swr","documentation":"https://swr.vercel.app","homepage":"https://swr.vercel.app"}],"libraryEditorial":{"example":{"language":"tsx","code":"export function Example() {\n return \u003csection>ky can be evaluated inside a Preact component.\u003c/section>;\n}"},"limitations":["PreactHub still needs project-specific verification notes for versions, bundle impact and edge cases."],"supplementalSections":[{"title":"Introduction","body":"ky is tracked in PreactHub because it is relevant for Preact applications, migrations, ecosystem comparisons or adjacent tooling."},{"title":"Preact configuration","body":"No `preact/compat` alias is required for the primary API."},{"title":"SSR notes","body":"The library can participate in SSR-oriented workflows when browser-only APIs are guarded."},{"title":"Islands notes","body":"ky can be used from interactive islands as long as initialization is scoped to the island root and cleaned up when necessary."}]},"libraryCategory":{"slug":"data-fetching","name":"Data Fetching","description":"Server state, caching and async data management.","icon":"⇄","section":"preact"}},"html":"","title":"ky for Preact – Compatibility, Setup and Alternatives","description":"Small Fetch-based HTTP client for browser and server code. Review ky compatibility with Preact, TypeScript and SSR support on PreactHub.","tags":["http","fetch"],"pageType":"website","headings":[{"id":"introduction","text":"Introduction","level":2},{"id":"installation","text":"Installation","level":2},{"id":"preact-configuration","text":"Preact configuration","level":2},{"id":"example","text":"Example","level":2},{"id":"ssr-notes","text":"SSR notes","level":2},{"id":"islands-notes","text":"Islands notes","level":2},{"id":"known-limitations","text":"Known limitations","level":2}],"relativePath":"content/libraries/entries/ky.md","lastUpdated":"2026-11-14T14:22:04.512Z"}