Could someone help me out with understanding getStaticProps and preview mode for a next.js sanity site? Both ends are deployed, I have a revalidate timer on getStaticProps, the only time new content comes up is when I redeploy. From what I'm reading I need to i @sanity/production-preview and have a preview file in both front and back to send and receive the url? Need to create a sanity.json file which I don't have one and I am unsure of what to fill it with. A helper function to get the client on preview mode for getStaticProps. A button function for the sanity studio so I could see the preview as well, is it necessary? Is that how I can have "ISR" I think and getStaticProps, have the content be loaded on the site with delay instead of having to redeploy everytime. Or would it be better that I use getServerSideProps? Wouldn't that be less optimized? Excuse the wall of text, or the dumb questions, I am trying to wrap my head around it.
May 31, 2023, 11:19 PM