Continuity of Topological product of spaces

Let $\displaystyle \alpha$ be an element in the index set I

Let X = $\displaystyle \prod$_{$\displaystyle \alpha$}X_$\displaystyle \alpha$ be the topological product of the family of spaces {X_$\displaystyle \alpha$}. Prove that a functon f:Y->X from a space Y into the product X is continuous if and only if for each $\displaystyle \alpha$ $\displaystyle \in$ I the function f_$\displaystyle \alpha$ = p_$\displaystyle \alpha$f: Y->X_$\displaystyle \alpha$

I think p_i is defined in a product space as the ith projection p_i: X -> X_i such that p_i(a) = a_i.

Wouldn't this be true because of the definition of continuity? Since a function is uniformly continuous if and only if it is continuous at all points?