The
Switch
component is used to toggle between two states. It is a wrapper around the native Switch
component.Switch
component in your code like this:
Switch.js