It is easier to get hired when one already has a job. So if it appears that the job will really be temporary, best to start looking for a better job right away. Giving notice before leaving a job will favorably impress both the old and new employer. And always leave on such terms that it would be easy to go back to the old employer.
I know one fellow who took a new, much better job. Laid off 2 months later, went back to his old employer and was hired immediately. Two weeks later, he was recalled as the layoff ended. The old employer asked him to continue working continue 4 hours per day, any hours he chose, while back at the new employer. He did and saved a bundle of money to apply toward a new house.