Let ϕ be an analytic
mapping of the unit disk D into itself. We characterize the weak compactness of the
composition operator Cϕ: f↦f ∘ ϕ on the vector-valued Hardy space H1(X)
(= H1(D,X)) and on the Bergman space B1(X), where X is a Banach space.
Reflexivity of X is a necessary condition for the weak compactness of Cϕ in each
case. Assuming this, the operator Cϕ: H1(X) → H1(X) is weakly compact if and
only if ϕ satisfies the Shapiro condition: Nϕ(w) = o(1 −|w|) as |w|→ 1−, where Nϕ
stands for the Nevanlinna counting function of ϕ. This extends a previous result of
Sarason in the scalar case. Similarly, Cϕ is weakly compact on B1(X) if and only if
the angular derivative condition lim|w|→1−(1 −|ϕ(w)|)∕(1 −|w|) = ∞ is satisfied. We
also characterize the weak compactness of Cϕ on vector-valued (little and big)
Bloch spaces and on H∞(X). Finally, we find conditions for weak conditional
compactness of Cϕ on the above mentioned spaces of analytic vector-valued
functions.