Add JSDoc params to setupState function, and a comment about why we're checking the details.reason enum.
Add JSDoc params to setupState function, and a comment about why we're
checking the details.reason enum.

adrifelt/experience-sampling,modulexcite/experience-sampling,googlearchive/experience-sampling,moduloprime/experience-sampling,adrifelt/experience-sampling,googlearchive/experience-sampling,modulexcite/experience-sampling,modulexcite/experience-sampling,adrifelt/experience-sampling,googlearchive/experience-sampling,moduloprime/experience-sampling