Typesafe Actions is an avoidable increase in bundle size. I'm not sure if it's possible but a Babel Macro would allow us to use the library without adding to the bundle size by creating the actions at compile time instead of run-time. It would also increase run-time performance as createAction does not need to be evaluated on each run. A sample transformation would be,
Typesafe Actions is an avoidable increase in bundle size. I'm not sure if it's possible but a Babel Macro would allow us to use the library without adding to the bundle size by creating the actions at compile time instead of run-time. It would also increase run-time performance as
createAction
does not need to be evaluated on each run. A sample transformation would be,