danielr18 / connected-next-router

A Redux binding for Next.js Router compatible with Next.js.
MIT License
109 stars 30 forks source link

Option to change action types names #53

Closed vabatta closed 10 months ago

vabatta commented 4 years ago

Would be great to have an option to change the hardcoded type action name such as this one https://github.com/danielr18/connected-next-router/blob/master/src/actions.ts#L11 .

danielr18 commented 4 years ago

Hey @vabatta, would you be able to create a PR for this?

If the onLocationChanged function is modified, you can pass the action name from this line: https://github.com/danielr18/connected-next-router/blob/6445d392dcd34b4d2ae3ee3745264172ef6e2e9e/src/ConnectedRouter.ts#L82

The part that may be complicated are the types.