I am not sure the most recent OPT policy. But, to be safe, you should apply for H4 first, she can resign after H4 is approved. Or she may resign after getting H4 receipt.