docs/public/1.0/radio-button-group.html
Radio button group allows to control a group of radio buttons.
import * as React from 'react';
import { View } from 'react-native';
import { RadioButtonGroup, RadioButton, Text } from 'react-native-paper';
export default class MyComponent extends Component {
state = {
value: 'first',
};
render() {
return(
<RadioButtonGroup
onValueChange={value => this.setState({ value })}
value={this.state.value}
>
<View>
<Text>First</Text>
<RadioButton value="first" />
</View>
<View>
<Text>Second</Text>
<RadioButton value="second" />
</View>
</RadioButtonGroup>
)
}
}
onValueChange (required)
Type: (value: string) => mixed
Function to execute on selection change.
value (required)
Type: string
Value of the currently selected radio button.
children (required)
Type: React.Node
React elements containing radio buttons.