This question already has an answer here:
I have been working in this company for the past 3 years. This is my first job, I started it as an intern while I was studying for faculty. I was then hired as Software Junior, and this year I was promoted to Software Engineer.
I like the team and what I am working on, but I don't like the town. I want to move back to my hometown, that I prefer and where my friends and family are. I've decided the best time to do so is next year.
We are 3 people (including the manager) in the team, working on a huge project. Should I inform my manager of the leaving as soon as possible or only once I found another job and have a contract with the other company?