![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-native-wheel-picker-android
Advanced tools
Simple Wheel Picker for Android to use with react-native
A simple Wheel Picker for Android (For IOs is used PickerIOS)
yarn add react-native-wheel-picker-android
react-native link react-native-wheel-picker-android
In android/settings.gradle
include ':react-native-wheel-picker-android'
project(':react-native-wheel-picker-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wheel-picker-android/android')
In android/app/build.gradle
dependencies {
...
compile project(':react-native-wheel-picker-android')
}
In android/app/src/main/java/com/PROJECT_NAME/MainApplication.java
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(new MainReactPackage(), new WheelPickerPackage());
}
import {
WheelPicker,
TimePicker,
DatePicker
} from "react-native-wheel-picker-android";
import React, { Component } from "react";
import { AppRegistry, StyleSheet, Text, View, Button } from "react-native";
const wheelPickerData = [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
];
class MyPicker extends Component {
state = {
selectedItem: 0
};
onItemSelected = selectedItem => {
this.setState({ selectedItem });
};
onPress = () => {
this.setState({ selectedItem: 3 });
};
render() {
return (
<View style={styles.container}>
<Button title={"Select third element"} onPress={this.onPress} />
<Text>Selected position: {this.state.selectedItem}</Text>
<WheelPicker
selectedItem={this.state.selectedItem}
data={wheelPickerData}
onItemSelected={this.onItemSelected}
/>
</View>
);
}
}
module.exports = MyPicker;
Prop | Default | Type | Description |
---|---|---|---|
onItemSelected | - | func | Returns selected position |
data | - | Array<string> | Data array |
isCyclic | false | bool | Make Wheel Picker cyclic |
selectedItemTextColor | black | string | Wheel Picker's selected Item text color |
selectedItemTextSize | 16 | number | Wheel Picker's selected Item text size |
selectedItemTextFontFamily | - | font-family | Wheel Picker's selected Item font |
itemTextColor | grey | string | Wheel Picker's Item Text Color |
itemTextSize | 16 | number | Wheel Picker's Item text size |
itemTextFontFamily | - | font-family | Wheel Picker's Item font |
selectedItem | 0 | number | Current item position |
initPosition | 0 | number | Initial item position |
indicatorColor | black | string | Indicator color |
hideIndicator | - | boolean | Hide indicator |
indicatorWidth | 1 | number | Indicator width |
backgroundColor | transparent | string | Wheel Picker background color |
onTimeSelected = date => {}
...
<TimePicker onTimeSelected={this.onTimeSelected}/>
Prop | Default | Type | Description |
---|---|---|---|
...WheelPicker props | - | - | All style WheelPicker props |
initDate | current date | Date | Initial date |
onTimeSelected | - | func | Callback with selected time |
hours | [1,2,3,4...] | Array<string> | Custom hours array |
minutes | [00,05,10,15...] | Array<string> | Custom minutes array |
format24 | false | boolean | Time format |
For IOs DatePickerIOS is used
onDateSelected = date => {}
...
<DatePicker onDateSelected={this.onDateSelected}/>
Prop | Default | Type | Description |
---|---|---|---|
DatePickerIOS props | - | - | All DatePickerIOS props (IOS only) |
initDate | current date | Date | Initial date |
onDateSelected | - | func | Callback with selected date |
days | [1,2,3,4...] | Array<string> | Custom days array (Android only) |
hours | [1,2,3,4...] | Array<string> | Custom hours array (Android only) |
minutes | [00,05,10,15...] | Array<string> | Custom minutes array (Android only) |
format24 | false | boolean | Time format (Android only) |
startDate | current date | Date | Min Date (Android only) |
daysCount | 365 | number | Days count to display from start date (Android only) |
hideDate | false | boolean | Hide days picker (Android only) |
hideHours | false | boolean | Hide hours picker (Android only) |
hideMinutes | false | boolean | Hide minutes picker (Android only) |
hideAM | false | boolean | Hide time format picker (Android only) |
Feel free to open an issue
FAQs
Simple Wheel Picker for Android to use with react-native
We found that react-native-wheel-picker-android demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.