Let's denote the number of cupcakes that JoJo decorates as \( x \).
According to the problem, Darcy decorates 8 cupcakes, and this is 2 more than \( \frac{1}{3} \) of the number of cupcakes JoJo decorates. We can express this relationship with the following equation:
\[ 8 = \frac{1}{3}x + 2 \]
To solve for \( x \), we first subtract 2 from both sides:
\[ 8 - 2 = \frac{1}{3}x \] \[ 6 = \frac{1}{3}x \]
Next, we multiply both sides by 3 to eliminate the fraction:
\[ 18 = x \]
Thus, JoJo decorates \( \boxed{18} \) cupcakes.