#NextJS and tRPC

9 messages ยท Page 1 of 1 (latest)

copper nimbus
#

Hi ๐Ÿ‘‹

Is it possible to use NextJS and tRPC within a Tauri application? I know NextJS is possible but the serverside props needs disabled so I'm curious if I can still use tRPC and if I could use it to access the file system and perform tasks on the machine the application is installed on?

fresh snow
sharp blade
#

but the serverside props needs disabled
The whole server side of nextjs will be disabled so there is nothing tRPC could connect to. (Not that i understand what trpc would even solve here ๐Ÿค” )

copper nimbus
#

So forgetting accessing the file system. Would it be possible to use tRPC to make data requests? Probably not if server side is disabled and that data should be retrieved up front or through an API I assume?

sharp blade
#

Would it be possible to use tRPC to make data requests?
From where? To remote servers? Sure. To the non-existend nextjs backend? Nope, if it would be possible the "normal" ways would work too :)

fresh snow
#

think of tauri as your server backend and nextJS as your frontend. You no longer have the NextJS backend - tauri is now filling that role.

copper nimbus
#

So would you even recommend using nextjs framework for a green field react project?

fresh snow
#

If you must stick to the React ecosystem - Plain react is good, or Nuxt. NextJS is also fine, as long as you understand the adaptations needed.