Hi, I'm quite new to SSR and I'm wondering which approach is better and why? It's just a simple example to help me understand it better I basically just have a edit button on a page and when I click it I want to show the editor for the page.
-
Wrap the entire page in a client component, then use state and when you click button set state so component is re-rendered with the editor instead of content.
-
Keep the page server rendered and redirect the user to page/?editing=true and then check for params when rendering the component if editing param is passed then render editor instead of the page.
So basically my question is if it's better to do redirects and keep things on the server or does it make more sense to use client side components and state?