Of course, this is an equilibrium reaction:
I could equally write,
in which we would regard the as the reactants.
Which side you designate as reactants depends on whether you are interested the DECOMPOSITION of hydrogen iodide, or the FORMATION of hydrogen iodide from its elements.