Q:

Redux-Saga somehow reducer updates without going through the saga

I am new to the saga world. Although I have worked with thunk on react-native territory, I am very confused at the moment. I am trying to get the skeleton of my project going which I expect to get very large soon. With that in mind, I am trying to separate the logic into multiple files.
I have gotten the reducer to fire except it is not the way I want. I am not sure how it is even happening. My saga does not fire but my state updates. I see the console log from my reducer but nothing from the saga watcher function. What should I change?
Index.js
import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import { Provider } from 'react-redux'

import reducer from './reducers'
import rootSaga from './sagas'
import App from './App'

const sagaMiddleware = createSagaMiddleware()
const store = createStore( 
  reducer,
  applyMiddleware(sagaMiddleware)
)
sagaMiddleware.run(rootSaga)

render( 
  <Provider store={store}>
    <App /> 
  </Provider>, 
  document.getElementById("etlRootDiv"),
);

App.js
import React, { Component } from 'react'
import { connect } from 'react-redux'

import FileExtensionSelector from './components/FileExtensionSelector'
import { setFileExtension } from './actions'

class App extends Component {
  constructor(props) {
    super(props) 
  }

  handleTypeSelect() {
    console.log('handle more click'); 
    this.props.setFileExtension('zip');
    console.log(this.props);
  }

  componentWillReceiveProps(nextProps){
    console.log(nextProps);
  }

  render() {
    return (
      <div>
        <FileExtensionSelector onFileTypeSelect={this.handleTypeSelect.bind(this)} />
        <div>{this.props.fileType} ...asdasd</div>
      </div>
    )
  }
} 

const mapStateToProps = ({ metaState }) => {
  const { fileType } = metaState;
  return { fileType };
};
 
const mapDispatchToProps = (dispatch) => ({
  setFileExtension(ext) {
    dispatch(setFileExtension(ext))
  }
})

export default connect(mapStateToProps, mapDispatchToProps)(App)

reducers/index.js
import { combineReducers } from 'redux';
import metaState from './MetaStateReducer';
 
const rootReducer = combineReducers({
  metaState,
})

export default rootReducer

reducers/metastatereducer.js
const INITIAL_STATE = {
  fileType: null,
  hasHeader: false,
};

export default function (state = INITIAL_STATE, action) {
  switch (action.type) {
    case 'SET_FILE_EXTENSION':
      console.log('/// in set file reducer ///');
      console.log(action);
      // console.log({ ...state, ...INITIAL_STATE, fileType: action.payload });
      return { ...state,...INITIAL_STATE, fileType: action.payload };
    default:
      return state;
  }
}

actions/metaStateActions.js
function action(type, payload = {}) {
  return { type, ...payload }
}

export const SET_FILE_EXTENSION = "SET_FILE_EXTENSION"; 
export const setFileExtension = (extension) => action( SET_FILE_EXTENSION, { payload: extension });

actions/index.js
export { setFileExtension, SET_FILE_EXTENSION } from './metaDataActions';

sagas/metastatesagas.js
import { take, put } from 'redux-saga/effects'
import { SET_FILE_EXTENSION } from '../actions';

function* watchFileExtension(ext) {
  console.log(' --- in watch file ext ---');
  const { extension } = yield take(SET_FILE_EXTENSION)
  console.log(`set extension is ${extension}`);
  // yield put({ type: 'SET_FILE_EXTENSION', payload: ext }); 
}

export const metaStateSagas = [
  take("SET_FILE_EXTENSION", watchFileExtension),
]

sagas/index
import { all } from 'redux-saga/effects'

import { metaStateSagas } from './MetaStateSagas';

export default function* rootSaga() {
  yield all([
    ...metaStateSagas,
  ])
}

A:

redux-saga always passes an action along to the store before attempting to process itself.  So, the reducers will always run before any saga behavior executes.
I think the error is that your metaStateSagas array needs to use takeEvery, not take, but I'm not entirely sure.  Try that and see if it fixes things.

