April 2017
Intermediate to advanced
414 pages
8h 14m
English
Switch is a component that renders a Boolean input and allows the user to toggle back and forth.
With Switch, these are the props that we will use:
A simple Switch component can look like this:
<Switch onValueChange={ (value) =? this.setState({ toggled: value })} value={ this.state.toggled } />
As stated earlier, Switch has two props that are required: its value and a callback to change its value when toggled.
Using this knowledge, let's make changes to the TasksList component so that it passes the completed ...
Read now
Unlock full access