rn-mycustompackagedemo v4.1.0
/*
Follow the steps to create a new npm:- https://youtu.be/No3nHbFrWsU
npm adduser
npm publish
if you want to update the new version
npm version minor(patch, major, or minor)
npm publish
*/ //-----------------------------------------
- mkdir in particular path,
Ex:- cd /Users/kuldip/Desktop/Projects/rn-myCustomPackageDemo
- create folder
src -> components -> components_name(Button)
- index.js
create a index.ts in components folder and menton import/export components in this file.
create a index.js in src folder and mention all the components in this file.
create a index.ts in out off src folder and mention src folder path in this file.
peerDependices in mention required third-party or react framework with version
Ex:-
"peerDependencies": { "react": "17.0.2", "react-native": "0.67.4", "react-native-responsive-screen": "^1.4.1", "react-native-indicators": "^0.17.0" }
Usage Of Package:-
npm i rn-mycustompackagedemo
- Import component
import { MyCustomTextFieldComponent, MyCustomButtonComponent,MyCustomActivityIndicatorComponent } from 'rn-mycustompackagedemo';
- MyCustomTextFieldComponent component Usage
<MyCustomTextFieldComponent otherStyle={{ width: wp(80)}} onChangeText={(text) => { this.setState({ email: text }) }} keyboardType={"email-address"} value={this.state.email} returnKeyType='done' secureTextEntry={false} autoCapitalize='none' placeholder={'Email'} placeholderTextColor='#000000' selectionColor={'#000000'} borderColor= {'#0000FF'} />
- MyCustomButtonComponent component Usage
<MyCustomButtonComponent onPress={() => this.btnNextClicked()} otherStyle={{ marginTop: hp(10.4947526237), backgroundColor: '#0000FF', width: wp(46.6666666667)}}> Submit
- MyCustomActivityIndicatorComponent component Usage
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago