cmcaboy / redux-typed

Code for youtube tutorial
70 stars 37 forks source link

Reuse defined action types #3

Closed flextremedev closed 4 years ago

cmcaboy commented 4 years ago

Thank you for this! Sorry for the confusion.

imranur8 commented 4 years ago

@cmcaboy and @flextremedev my opinion is we can keep all actions.ts types in same expense.ts file so when more feature type will add we can create separate .ts file for that type. Otherwise, this common actions.ts file will be large with time.

Propose file structure : types/expense.ts all expense type + expense action types types/income.ts all income type + income action types

I can give a PR for this. if this structure make sense.

flextremedev commented 4 years ago

Hi @imranur8, I don't think the file structure is relevant here but what's inside the files. Everyone has his own preferences when it comes to structuring React apps. Nonetheless I definitely agree that this wouldn't scale well over time.