Handling Block Content Type from Sanity in Next.js with TypeScript
Unanswered
Braconid wasp posted this in #help-forum
Braconid waspOP
Hi, I want to fetch a post from Sanity to my Next.js app, but TypeScript types are required. Is the approach for handling the block content field correct?
10 Replies
@Braconid wasp Hi, I want to fetch a post from Sanity to my Next.js app, but TypeScript types are required. Is the approach for handling the block content field correct?
if that aligns with the response u usually get, yes its fine
u dont need to use Array#Unknown Channel tho, u can just use []
Braconid waspOP
@gin Is there any potential unexpected behavior when using PortableText from @portabletext/react?
is there a better approach to handling rich text in my Next.js app ?
Braconid waspOP
@gin thank u ❤
np :)