should I resign before getting 797 document?

I am currently in the US on an H1 which is about to expire in a month. A new company I am interviewing with tells me that I can join them based on some online notification that they recieve from USCIS that basically is a notification that USCIS has recieved their request for transfer. Apparantly it is legal to work for another employer once this notification from USCIS is there even though the petition is not approved and the i797 document has not yet reached me or the company. They are Not doing the transfer on premium as well. Is this true and is it safe to do it this way considering my current i94 will only be valid till end of this month.

Thanks.