Let $(X_j,\tau _j), j\in I$ be topological spaces, where $I$ is a set. Let $$(Y,\tau ^\times) := \left (\prod_{j\in I}X_j,\tau ^\times\right ) $$ be the product topology, where $\tau ^\times$ is the weakest topology s.t the projection mapping $\pi _j : (Y,\tau ^\times)\to (X_j,\tau _j)$ is continuous.
Let $(Z,\tau _Z)$ be a topological space and $f:Z\to Y$
Show that $f$ is continuous if and only if for every $j\in I$, $\pi _jf$ is continous.
The forward implication holds because composition of continous functions is continous.
Having trouble with reverse implication. Here in the accepted answer they say the sets of the form $$\bigcap_{k=1}^n \pi _j^{-1}(V_{j_k}), V_{j_k}\in\tau _{j_k}, j_1,\ldots ,j_k\in I, n\in\mathbb{N} $$ are a basis on the product topology which is indeed, easy to see. What isn't so clear is where exactly they use the continuity of $\pi _jf$.
To show $f$ is continous, let $V\in\tau ^\times$. Need to show that $f^{-1}(V)\in\tau _Z$. Consider the collection $$\tau = \lbrace U\subset Y :f^{-1}(U)\in\tau _Z \rbrace$$ It is very straightforward to verify $(Y,\tau)$ is a topological space. IF $\pi _j : (Y,\tau)\to (X_j,\tau _j)$ is continous, then by definition, we would have $\tau ^\times\subset\tau$, implying $f^{-1}(V)\in\tau _Z$.
Drawing fairly blank on continuity of $\pi _j$ w.r.t to this new topology $\tau$ and still perplexed about how to utilize the premise of continuity of $\pi _jf$. It only provides that the preimage of $V\in\tau _j$ is open in $Z$ and it's not true, in general, that if the composition is continous, its components are continous.