How does Next.js SSR working exactly.
If I don't care SEO at all then I can use React right? What if i care about SEO and don't want/need a node.js server in my background.
I have an API written in PHP. I tried in my local server to send requests from Next app to PHP Backend. In a real application do i have to create a Node.js backend in my server or is it enough to install Node and Npm only to install Next and it's dependencies?
Any page that uses getServerSideProps, Next.js converts that page to a lambda function. You don't need a node server running 24/7 for hosting your application.
Also, if you don't use getServerSideProps, Next.js by default will pre-render your page, this page gets cached on a CDN.
So yes you can make API calls to your PHP backend, without the need for a setting up a nodejs server yourself.
Hope that answers your question.
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With