I will update Salesforce for the first time.
If I update my sandbox after upgrading Salesforce, will ApexClass and LightningComponent disappear?
What should I do to keep the program from disappearing?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
All the org already been upgraded to summer 19 by now. If you want fresh metadata from your target org, off course you can refresh it. It will replace your existing metadata, so you need to take backup of your apex classes and Lightning Component before refresh. Or you will loose it.
Read more here:- Create, Clone, or Refresh a Sandbox
When you refresh a sandbox it will make a copy of either your production org or another Sandbox. I recommend using something like Github as the place where your codebase lives and not your production org.
Then you can refresh a sandbox, clone your git repo and deploy your work in the sandbox or scratch org.