Recently I have been studying a lot about dapps and now working on a little complex one. So what I wanted to ask is which is better for a dapp ? SSR or CSR ? I have read in a couple of places that we should use SSR incase if metamask is not installed on the browser and we can fetch info from the Ethereum blockchain on the server using something like infura from the server(ofcourse we still cant sign anything).
A simple setup would be like the code in the link below
As you can see I am checking if web3 exist in the browser and use the injected one but if its not (else case), I am using infura.
My question is that cant we just use CSR because it will work even if the page is rendered in the client side. It will simply use infura if web3 doesn't exits and we can use componentDidMount lifecycle method for fetching the data from the ethereum blockchain. Please ask for the details if needed
Regards