As per regulation that came into effect in Jan 2017, H1B Visa holders can get a grace period of 60 days to find another job or change visa status, if their employment on H1B visa is terminated due to layoff or other unforeseen reasons, before the end of their H1B petition validity. Please note that if your I-94 or petition end date is before 60 days from your job loss or lay off, then your grace period is shortened until the expiration of your I-94 date.