2017-02-21 5 views
0

나는 자기 학습 프로젝트를 개발하기 위해 react-boilerplate을 사용하고 있습니다.경로에 사가를 주입하는 상용구의 상용구

그러나 난 NavigationContainer 같은 Navigation와 컨테이너라는 구성 요소가

routes.js에게 메인 routes.js

{ 
     path: '/', 
     name: 'home', 
     getComponent(nextState, cb) { 
     const importModules = Promise.all([ 
      import('containers/HomePage'), 
      import('containers/NavigationContainer/reducer'), 
      import('containers/NavigationContainer/sagas'), 
     ]); 

     const renderRoute = loadModule(cb); 

     importModules.then(([component, reducer, sagas]) => { 
      injectReducer('navigationContainer', reducer.default); 
      injectSagas('navigationContainer', sagas.default); 
      renderRoute(component); 
     }); 

     importModules.catch(errorLoading); 
     }, 
    } 

을 무용담 주입에 문제가있다.

주요 컨테이너

import Navigation from '../../containers/NavigationContainer'; 

export default class HomePage extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function 
    render() { 
    return (
     <div> 
     <NavigationContainer /> 
     </div> 
    ); 
    } 
} 

되고 오류는 다음과 같다 홈페이지 컨테이너 :

Uncaught (in promise) Error: (app/utils...) injectAsyncSagas: Expected "sagas" to be an array of generator functions

나는 문제가 무엇인지 단서가 없다? github에서 이미 검색했지만 아무 것도 발견하지 못했습니다. 다음은이 관행에 따라

답변