esamattis / immer-reducer

Type-safe and terse reducers with Typescript for React Hooks and Redux
http://npm.im/immer-reducer
MIT License
225 stars 15 forks source link

[Suggestion] Allow custom action creator prefix #12

Closed iamchanii closed 5 years ago

iamchanii commented 5 years ago

Hi! I like this awesome library as typescript user with react.

I hope to customize action type prefix. but now, the prefix is constraint value ("IMMER_REDUCER") I suggest allow custom action type's prefix, so user can customize that.

so, I did it on my forked repository: https://github.com/iamchanii/immer-reducer/commit/735f58e14917444add14ddb65d7816ee10a72837

i think maybe it makes offend you. This suggest may prevent the prefix IMMER_REDUCER from being seen in the user's application. but if you don't mind it and you want this suggest, I will submit a PR happily!

esamattis commented 5 years ago

It's cool! So PR welcome 😊

iamchanii commented 5 years ago

It's cool! So PR welcome 😊

Thanks for your reaction! I will submit right now.