The T3 Stack for Beginners — NextJS, tRPC & Typescript made fun!

Jason
Oct 20, 2022

--

. 表示不要創建子資料夾 ( 他是先開一個資料夾,在裡面用 powershell )

建立一個 get router

使用創建的 get router

使用 trpc,useQuery 是用來拿資料的。

第二個 parameter 是一個物件,可以用 onSuccess 來取得資料

如果傳出去的資料有變動,會提醒

可以解構出 data 用,也可以拿出 isLoading 決定還沒 loading 完成時的顯示

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jason
Jason

Written by Jason

Nothing is true, everything is permitted.

No responses yet

Write a response