How it works...

Anywhere that you can use a Checkbox component, you can also use a Switch component. This code was taken from the Abstracting checkbox groups section from earlier in this chapter. The Checkbox components were replaced with Switch components.

Get React Material-UI Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.