From 5fd4546ec12c6387b19d0cf0cea49a0187f036fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaeuk=20Lim=28=EC=9E=84=EC=9E=AC=EC=9A=B1=29?= Date: Sun, 24 Aug 2025 15:51:53 +0900 Subject: [PATCH] docs: update documentation --- README.md | 11 +++-------- docs/.vitepress/en.mts | 2 +- docs/en/{installation.md => getting-started.md} | 2 +- docs/en/index.md | 5 ++++- docs/en/intro.md | 13 +++++++++---- 5 files changed, 18 insertions(+), 15 deletions(-) rename docs/en/{installation.md => getting-started.md} (97%) diff --git a/README.md b/README.md index 3a52cec..2263e2f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,10 @@ # tanstack-query-optimistic-updates · [![LICENSE](https://img.shields.io/badge/license-MIT-blue)](./LICENSE) [![version](https://img.shields.io/npm/v/tanstack-query-optimistic-updates?color=blue&logo=npm)](https://www.npmjs.com/package/tanstack-query-optimistic-updates) -A simple way to apply optimistic updates with TanStack Query. +`tanstack-query-optimistic-updates` is a simple way to apply optimistic updates with TanStack Query. -## Visit [tanstack-query-optimistic-updates](https://mugglim.github.io/tanstack-query-optimistic-updates) for docs and guides! +## Getting Started -## Features - -- **✨ Seamless**: Complete compatibility layer to seamlessly replace useMutation -- **⚡ Lightweight**: Zero external dependencies for minimal bundle size -- **📦 Dual Package Support**: Built for both ESM and CJS to optimize tree shaking -- **🛡️ Type Safety**: Complete typed API with comprehensive type definitions +Visit https://mugglim.github.io/tanstack-query-optimistic-updates to get started with tanstack-query-optimistic-updates. ## Contributing diff --git a/docs/.vitepress/en.mts b/docs/.vitepress/en.mts index 9ea2796..29efae1 100644 --- a/docs/.vitepress/en.mts +++ b/docs/.vitepress/en.mts @@ -5,7 +5,7 @@ const sidebarList: DefaultTheme.SidebarItem[] = [ text: "Guide", items: [ { text: "Introduction", link: "/intro.html" }, - { text: "Installation & Usage", link: "/installation.html" } + { text: "Getting Started", link: "/getting-started.html" } ] }, { diff --git a/docs/en/installation.md b/docs/en/getting-started.md similarity index 97% rename from docs/en/installation.md rename to docs/en/getting-started.md index 033b291..8999355 100644 --- a/docs/en/installation.md +++ b/docs/en/getting-started.md @@ -1,4 +1,4 @@ -# Installation & Usage +# Getting Started ## Installation diff --git a/docs/en/index.md b/docs/en/index.md index a1a9836..115b22a 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -9,7 +9,10 @@ hero: text: About link: /intro.html - theme: alt - text: GitHub + text: Reference + link: /react/useOptimisticMutation.html + - theme: alt + text: Github link: https://github.com/mugglim/tanstack-query-optimistic-updates features: diff --git a/docs/en/intro.md b/docs/en/intro.md index 4b4a1ef..adc14e3 100644 --- a/docs/en/intro.md +++ b/docs/en/intro.md @@ -1,8 +1,6 @@ -# Introduction +# About Tanstack Query Optimistic Updates -tanstack-query-optimistic-updates is a simple way to apply optimistic updates with TanStack Query. - -## Motivation +`tanstack-query-optimistic-updates` is a simple way to apply optimistic updates with TanStack Query. TanStack Query provides APIs to apply optimistic updates. However, applying optimistic updates requires repetitive boilerplate code. @@ -15,6 +13,13 @@ tanstack-query-optimistic-updates offers a way to simplify and make more consist - **Enforce consistency**: Provide a abstraction for optimistic updates to keep codebases clean and predictable. - **Make optimistic updates easy**: Lets you focus on business logic instead of repetitive callback and cache management. +## Features + +- **✨ Seamless**: Complete compatibility layer to seamlessly replace useMutation +- **⚡ Lightweight**: Zero external dependencies for minimal bundle size +- **📦 Dual Package Support**: Built for both ESM and CJS to optimize tree shaking +- **🛡️ Type Safety**: Complete typed API with comprehensive type definitions + ## Links - [Github](https://github.com/mugglim/tanstack-query-optimistic-updates)