O'Reilly logo

JavaScript at Scale 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

Generic component configuration

As we saw in the preceding section on locale preferences, we need to load a preference value, which can then be used by each of our components. Or maybe just one component in the case of locales, but this preference value indirectly impacts all components. Looking beyond locales, there're a lot of other things we'll want to configure in our components. This section looks at the problem from a generic perspective. First we need to decide on which aspects of a given component are configurable, and then there are the mechanics of getting those preferences into the components at runtime.

Deciding on configuration values

The first step with component configuration is deciding on preferences—which aspects of the component ...

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