When うち, (sometimes seen using the kanji 内（うち）, or 裡（うち）) is paired with the 格助詞（かくじょし） (case marking particle) に
, it expresses a period/space ‘within’ which something else will/should happen/exist. It quite often (but not always) carries the nuance of (A) being the ‘best’, or the ‘optimal’ time/space within which (B) could occur/exist. In English, うちに
can simply be translated as ‘while’, or ‘during’.
may be paired with the ている form of verbs, the plain form of い-Adjectives
, nouns followed by の, or な-Adjectives
that are followed by な.
As I've been meeting with him everyday, I have gradually come to like him. (As I spend more time with him every day, I have grown to like him)
Eat it while it's hot!
Let's all go on a family trip while grandpa is still healthy!
Let's get ready for tomorrow while we have time. (Before it is too late)
expresses something that can happen/exist anywhere ‘within’ the span of (A), and is therefore non-specific as to where (B) is located.
I got sleepy while driving, so I took a break at a convenience store. (While in the process of driving)
I got sleepy while driving, so I took a break at a convenience store. (At one point while driving)
The kanji 裡（うち） refers literally to the inner walls/lining of something, and anything that is enclosed within that space. This can be thought of as where the ‘non-specificity’ of うち comes from, in regard to where within that space something is.