O'Reilly logo

Flux Architecture by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parameterized action creators

The final section of this chapter focuses on parameterized action creators. All the action creator functions we've looked at so far in the chapter have been basic functions that don't accept any arguments. This is fine, except for when we start to accumulate several unique actions that are nearly identical. Without parameterized action creator functions, we'll soon have an endless proliferation of functions; this does not scale.

First, we'll establish the goals of passing arguments to action creator functions, followed by some example code that implements generic action creator functions. We'll then look into creating partial functions to further reduce repetitiveness by composing action creators.

Removing redundant ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required