pauldijou / redux-act

An opinionated lib to create actions and reducers for Redux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate action type

etroynov opened this issue · comments

Hi,

When use redux-act with next.js in my project, after page changes i receive this error:

TypeError: Duplicate action type: REQUEST_PAGES
    at check (/home/xxx/www/ucavtor/node_modules/redux-act/lib/types.js:33:11)
    at createAction (/home/xxx/www/ucavtor/node_modules/redux-act/lib/createAction.js:50:22)
    at Object.<anonymous> (/home/xxx/www/ucavtor/site/actions/pagesActions.js:17:29)
    at Module._compile (module.js:660:30)
    at Module._compile (/home/xxx/www/ucavtor/site/node_modules/source-map-support/source-map-support.js:492:25)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)

I think that problem is in HMR.

have someone any idea how i can fix that? At this moment i restart server after any changes.

Is there any hook for HMR from Next.js we could plug into to reset checks?

You can always disable all checks during dev: https://github.com/pauldijou/redux-act/blob/master/README.md#types