README
react-native-component
Generate skeletons for react native components
Note: this package assumes you use components with the following structure:
.
├── ComponentName
├── index.js
├── styles.js
Installation
yarn global add react-native-component
or
npm install -g react-native-component
Usage
To create a component in the current directory
react-native-component -n <ComponentName>
To create a component in a specified path
react-native-component -n <ComponentName> -p <CustomPath>
To specify that the component should be stateless
react-native-component -n <ComponentName> -s
Example
- Creating a Login component
react-native-component -n Login
- Creating a stateless Button component in a specific path
react-native-component -n Button -p components/Common