1
1
2
- # ` @react-native-community /picker `
2
+ # ` @react-native-picker /picker `
3
3
4
4
5
5
6
- [ ![ npm version] ( https://img.shields.io/npm/v/@react-native-community /picker.svg )] ( https://www.npmjs.com/package/@react-native-community /picker )
7
- [ ![ Build] ( https://github.com/react-native-picker/picker/workflows/Build/badge.svg )] ( https://github.com/react-native-picker/picker/actions ) ![ Supports Android, iOS, MacOS, and Windows] ( https://img.shields.io/badge/platforms-android%20|%20ios|%20macos|%20windows-lightgrey.svg ) ![ MIT License] ( https://img.shields.io/npm/l/@react-native-community /picker.svg ) [ ![ Lean Core Extracted] ( https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg )] ( https://github.com/facebook/react-native/issues/23313 )
6
+ [ ![ npm version] ( https://img.shields.io/npm/v/@react-native-picker /picker.svg )] ( https://www.npmjs.com/package/@react-native-picker /picker )
7
+ [ ![ Build] ( https://github.com/react-native-picker/picker/workflows/Build/badge.svg )] ( https://github.com/react-native-picker/picker/actions ) ![ Supports Android, iOS, MacOS, and Windows] ( https://img.shields.io/badge/platforms-android%20|%20ios|%20macos|%20windows-lightgrey.svg ) ![ MIT License] ( https://img.shields.io/npm/l/@react-native-picker /picker.svg ) [ ![ Lean Core Extracted] ( https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg )] ( https://github.com/facebook/react-native/issues/23313 )
8
8
9
9
| Android | iOS | PickerIOS | Windows | MacOS |
10
10
| --- | --- | --- | --- | --- |
11
11
| <img src =" ./screenshots/picker-android.png " width =" 150 " > | <img src =" ./screenshots/picker-ios.png " width =" 150 " > | <img src =" ./screenshots/pickerios-ios.png " width =" 150 " > | <img src =" ./screenshots/picker-windows.png " width =" 300 " > | <img src =" ./screenshots/picker-macos.png " width =" 300 " >
12
12
13
13
## Supported Versions
14
14
15
- | @react-native-community /picker | react-native |
15
+ | @react-native-picker /picker | react-native |
16
16
| --- | --- |
17
17
| >= 1.2.0 | 0.60+ or 0.59+ with [ Jetifier] ( https://www.npmjs.com/package/jetifier ) |
18
18
| >= 1.0.0 | 0.57 |
19
19
20
20
## For Managed Workflow users using Expo 37
21
21
This component is not supported in the managed workflow for expo sdk 37. Please import the ` Picker ` from ` react-native ` .
22
- See more info [ here] ( https://github.com/react-native-community/react-native- picker/issues/45#issuecomment-633163973 )
22
+ See more info [ here] ( https://github.com/react-native-picker/ picker/issues/45#issuecomment-633163973 )
23
23
24
24
## Getting started
25
25
26
- ` $ npm install @react-native-community /picker --save `
26
+ ` $ npm install @react-native-picker /picker --save `
27
27
28
28
or
29
29
30
- ` $ yarn add @react-native-community /picker `
30
+ ` $ yarn add @react-native-picker /picker `
31
31
32
32
### For [email protected] or above
33
33
34
34
As
[ [email protected] ] ( https://reactnative.dev/blog/2019/07/03/version-60 ) or above supports autolinking, so there is no need to run linking process.
35
- Read more about autolinking [ here] ( https://github.com/react-native-community /cli/blob/master/docs/autolinking.md ) .
35
+ Read more about autolinking [ here] ( https://github.com/react-native-picker /cli/blob/master/docs/autolinking.md ) .
36
36
37
37
#### iOS
38
38
CocoaPods on iOS needs this extra step
@@ -49,7 +49,7 @@ No additional step is required.
49
49
50
50
1 . Open the solution in Visual Studio 2019
51
51
2 . Right-click Solution icon in Solution Explorer > Add > Existing Project
52
- Select ` D:\dev\RNTest\node_modules\@react-native-community \picker\windows\ReactNativePicker\ReactNativePicker.vcxproj `
52
+ Select ` D:\dev\RNTest\node_modules\@react-native-picker \picker\windows\ReactNativePicker\ReactNativePicker.vcxproj `
53
53
54
54
##### ** windows/myapp.sln**
55
55
Add a reference to ` ReactNativePicker ` to your main application project. From Visual Studio 2019:
@@ -75,15 +75,15 @@ pod install
75
75
76
76
### Mostly automatic installation (react-native < 0.60)
77
77
78
- ` $ react-native link @react-native-community /picker `
78
+ ` $ react-native link @react-native-picker /picker `
79
79
80
80
### Manual installation (react-native < 0.60)
81
81
82
82
83
83
#### iOS
84
84
85
85
1 . In XCode, in the project navigator, right click ` Libraries ` ➜ ` Add Files to [your project's name] `
86
- 2 . Go to ` node_modules ` ➜ ` @react-native-community /picker ` and add ` RNCPicker.xcodeproj `
86
+ 2 . Go to ` node_modules ` ➜ ` @react-native-picker /picker ` and add ` RNCPicker.xcodeproj `
87
87
3 . In XCode, in the project navigator, select your project. Add ` libRNCPicker.a ` to your project's ` Build Phases ` ➜ ` Link Binary With Libraries `
88
88
4 . Run your project (` Cmd+R ` )<
89
89
@@ -94,17 +94,17 @@ pod install
94
94
- Add ` new RNCPickerPackage() ` to the list returned by the ` getPackages() ` method
95
95
2 . Append the following lines to ` android/settings.gradle ` :
96
96
```
97
- include ': @react-native-community /picker '
98
- project(': @react-native-community /picker ').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community /picker /android')
97
+ include ': @react-native-picker /picker '
98
+ project(': @react-native-picker /picker ').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-picker /picker /android')
99
99
```
100
100
3 . Insert the following lines inside the dependencies block in ` android/app/build.gradle ` :
101
101
```
102
- implementation project(path: ':@react-native -community_picker ')
102
+ implementation project(path: ':@react-native -picker_picker ')
103
103
```
104
104
#### MacOS
105
105
106
106
1 . In XCode, in the project navigator, right click ` Libraries ` ➜ ` Add Files to [your project's name] `
107
- 2 . Go to ` node_modules ` ➜ ` @react-native-community /picker ` and add ` RNCPicker.xcodeproj `
107
+ 2 . Go to ` node_modules ` ➜ ` @react-native-picker /picker ` and add ` RNCPicker.xcodeproj `
108
108
3 . In XCode, in the project navigator, select your project. Add ` libRNCPicker.a ` to your project's ` Build Phases ` ➜ ` Link Binary With Libraries `
109
109
4 . Run your project (` Cmd+R ` )<
110
110
@@ -115,10 +115,10 @@ Renders the native picker component on iOS and Android. Example:
115
115
116
116
#### Usage
117
117
118
- Import Picker from ` @react-native-community /picker `
118
+ Import Picker from ` @react-native-picker /picker `
119
119
120
120
``` javascript
121
- import {Picker } from ' @react-native-community /picker' ;
121
+ import {Picker } from ' @react-native-picker /picker' ;
122
122
```
123
123
124
124
Create state which will be used by the ` Picker `
0 commit comments