快速開始

沒耐心?

如果你等不及了,可以直接透過以下指令克隆並執行 基本範例

bash
npx degit https://github.com/tanstack/router/examples/solid/start-basic start-basic
cd start-basic
npm install
npm run dev
npx degit https://github.com/tanstack/router/examples/solid/start-basic start-basic
cd start-basic
npm install
npm run dev

如果想使用其他範例,只需將上面的 start-basic 替換為下方列表中你想要的範例代稱。

克隆完想要的範例後,回到 基礎教學 指南學習如何使用 TanStack Start!

範例

TanStack Start 提供了大量範例供你入門。從下方挑選一個範例開始吧!

Stackblitz

每個範例上方都嵌入了 Stackblitz 預覽功能,方便你找到合適的起點。

快速部署

若要快速部署範例,點擊範例頁面上的 Deploy to Netlify 按鈕,即可將範例克隆並部署到 Netlify。

手動部署

若要手動克隆並部署範例到其他平台,請使用以下指令,並將 EXAMPLE_SLUG 替換為上方範例的代稱:

bash
npx degit https://github.com/tanstack/router/examples/solid/EXAMPLE_SLUG my-new-project
cd my-new-project
npm install
npm run dev
npx degit https://github.com/tanstack/router/examples/solid/EXAMPLE_SLUG my-new-project
cd my-new-project
npm install
npm run dev

克隆或部署範例後,回到 基礎教學 指南學習如何使用 TanStack Start!

其他 Router 範例

雖然這些不是 Start 專屬範例,但可能有助於你更了解 TanStack Router 的運作方式:

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.