Gist contains example files for redux-saga user(GET) module. The structure of redux for included files in this gist:
redux
βββ user # Module name
β βββ __tests__ # Directory for redux module tests
β β βββ actions.test.js # Action tests
β β βββ saga.test.js # Saga tests
β βββ actions.js # Module actions (f/e.: fetchUserRequest, fetchUserSuccess)
β βββ reducer.js # Module reducer
β βββ saga.js # Module saga
β βββ types.js # Declared module constants (f/e.: FETCH_USER_REQUEST)
Example of redux with nested module
redux
βββ user # Module name
β βββ add # Sub-module name
β β βββ __tests__
β β β βββ actions.test.js
β β β βββ saga.test.js
β β βββ actions.js
β β βββ reducer.js
β β βββ saga.js
β β βββ types.js
β βββ delete
β βββ __tests__
β β βββ actions.test.js
β β βββ saga.test.js
β βββ actions.js
β βββ reducer.js
β βββ saga.js
β βββ types.js
|
βββ user-cats
β βββ __tests__
β β βββ actions.test.js
β β βββ saga.test.js
β βββ actions.js
β βββ reducer.js
β βββ saga.js
β βββ types.js
|
βββ root-reducer.js # Reducers from ALL modules are here
βββ root-saga.js # Sagas from ALL modules are here
Personally didn't find any better solution back then.
Didn't touch
redux-saga
in a while so perhaps there is a better solution existing nowadays.