Jotas
Jotas
TTCTheo's Typesafe Cult
Created by Jotas on 7/7/2024 in #questions
Whats the point of this ternary operator in the nextjs homepage of Create T3 App?
I thought i knew my nextjs, but there is a
{hello ? hello.greeting : "Loading tRPC query..."}
{hello ? hello.greeting : "Loading tRPC query..."}
while hello is
export default async function Home() {
const hello = await api.post.hello({ text: "from tRPC" });
export default async function Home() {
const hello = await api.post.hello({ text: "from tRPC" });
Isnt that await supposed to work like the old "getServersideProps"? when would that Loading state be visible? because i couldnt even get it to trigger locally (it always just shows the greeting).
7 replies