〜うちに This pattern is used to say to do something while a state lasts, before it changes ("while ~"). With a negative, it means "before ~ happens".
Formation
dictionary / ている / ない form + うちに ・ い-adjective + うちに ・ な-adjective + な / noun + の + うちに
| 温かい | 温かい + うちに | 温かいうちに |
| 元気 | 元気 + な + うちに | 元気なうちに |
| 学生 | 学生 + の + うちに | 学生のうちに |
| 暗くなる | 暗くならない + うちに | 暗くならないうちに |
| 話す | 話している + うちに | 話しているうちに |
Examples
温かいうちに食べてください。
Please eat it while it's warm.
暗くならないうちに帰りましょう。
Let's go home before it gets dark.
話しているうちに、仲良くなった。
While we were talking, we became friends.