<commit_before>import {spawn} from 'redux-saga/effects';
import {onSubmitActions} from './common';
import formSubmitSaga from './form-submit-saga';

const factory = SubmissionError => ({
  onSubmitActions,
  formSubmitSaga: formSubmitSaga(SubmissionError),

  addFormSubmitSagaTo (root) {
    if (!root) {
      return formSubmitSaga(SubmissionError);
    }
    return function* formSubmitSagaComposed () {
      yield [
        spawn(root),
        spawn(formSubmitSaga(SubmissionError))
      ];
    };
  }

});

export default factory;<commit_msg>Updated to use new method of spawning multiple sagas<commit_after>import {all, spawn} from 'redux-saga/effects';
import {onSubmitActions} from './common';
import formSubmitSaga from './form-submit-saga';

const factory = SubmissionError => ({
  onSubmitActions,
  formSubmitSaga: formSubmitSaga(SubmissionError),

  addFormSubmitSagaTo (root) {
    if (!root) {
      return formSubmitSaga(SubmissionError);
    }
    return function* formSubmitSagaComposed () {
      yield all([
        spawn(root),
        spawn(formSubmitSaga(SubmissionError))
      ]);
    };
  }

});

export default factory;
{'fraction_non_alphanumeric': 0.1174934725848564, 'fraction_numerical': 0.0, 'mean_word_length': 3.7916666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5165210', 'n_tokens_mistral': 355, 'n_tokens_neox': 353, 'n_words': 75}