My H1 is expiring this year and my spouse H1 also which is with different employer.

My spouse has I140 approved and is in 6th years. I want to visit India and come back on H4 visa based on spouse's H1 extension. So do I need to apply for H4 extension for my-self before going to India, or I can simply leave US before my H1 expiry and go for H4 stamping as a family stamping interview along-with spouse and child. Please advise.