If you were building an Electron app with Next.js, would everything be technically client side?
Answered
Piping Plover posted this in #help-forum
Piping PloverOP
I'm a beginner to Next.js development, so forgive me if this is a noob question.
When you build a Next.js website, everything can be either a server component or a client component.
If you're building an Electron app though, since the app is being hosted locally, wouldn't everything essentially function like it was a client component?
How should you go about fetching data? Should you fetch data client side or should you do it server side?
When you build a Next.js website, everything can be either a server component or a client component.
If you're building an Electron app though, since the app is being hosted locally, wouldn't everything essentially function like it was a client component?
How should you go about fetching data? Should you fetch data client side or should you do it server side?
Answered by Ray
yes, the app will run on client side and you should fetch the data on client
2 Replies
@Piping Plover I'm a beginner to Next.js development, so forgive me if this is a noob question.
When you build a Next.js website, everything can be either a server component or a client component.
If you're building an Electron app though, since the app is being hosted locally, wouldn't everything essentially function like it was a client component?
How should you go about fetching data? Should you fetch data client side or should you do it server side?
yes, the app will run on client side and you should fetch the data on client
Answer
@Ray yes, the app will run on client side and you should fetch the data on client
Piping PloverOP
Thanks!