Captain
NextJS + TRPC + NX
i have a nextjs application inside a NX monorepo. i have everything for @trpc/server inside a node library. i have moved the utils file inside the SRC folder in the next js project. this way, i have node lib which does all for routing an backend logic. i have another lib for ui. this lib exports dumb ui components.
suppose i wanted to move the trpc utils file to one of my libraries so as to be able to fetch data inside the "dumb components", could i do this and is this correct? right now, im forced to prop drill because applications cant share code in NX. only libs can.
anyone have a pattern for either creating smart components inside NX libs or a pattern for providing context?
15 replies
context at times empty
am new to trpc. i am usin iron-session with nextjs and its awesome. am forwarding the context. but sometimes session is empty. then it reload and session is not empty. tried it with static data. this doesnt happen with static data. any ideas? i have followed the trpc docs for adding trpc to an existing nextjs application.
1 replies