UNPKG

generator-simple-react-component

Version:
22 lines (19 loc) 1.45 kB
[![npm version](https://badge.fury.io/js/generator-simple-react-component.svg)](https://badge.fury.io/js/generator-simple-react-component) [![Dependencies status](https://david-dm.org/fadehelix/generator-simple-react-component/master/status.svg)](https://david-dm.org/fadehelix/generator-simple-react-component/master) [![Dev dependencies status](https://david-dm.org/fadehelix/generator-simple-react-component/master/dev-status.svg)](https://david-dm.org/fadehelix/generator-simple-react-component/master?type=dev) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/fadehelix/generator-simple-react-component/master/LICENSE) # Generator Simple React Component Create boilerplate for functional or class React component. In addition you will get first snapshot test for free! ## Instalation ```bash $ npm i -g generator-simple-react-component ``` ## Usage __Important!__ The generator assumes that you run it in directory where you store all of your other React components. ```bash $ cd /your/react/app $ yo simple-react-component ``` ## Notes If you want to use the generator in react native project then` you have to change an extension of generated `.jsx` files to `.js` because the [packager doesn't support .jsx files](https://github.com/facebook/react-native/issues/2303).