This means you should do something while a situation is still true. It is like saying 'while' or 'before' something changes.
、。
Please eat it while it's hot.
、に。
Let's go home before it starts raining.
、。
While I was reading a book, I fell asleep before I knew it.
、。
You should have a lot of different experiences while you're young.
に、に。
While I'm in Japan, I'd like to try climbing Mt. Fuji once.