Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yago/blank-component
⚛️ Blank React Component
https://github.com/yago/blank-component
emotionjs enzyme jest react reactjs storybook
Last synced: about 1 month ago
JSON representation
⚛️ Blank React Component
- Host: GitHub
- URL: https://github.com/yago/blank-component
- Owner: Yago
- Created: 2019-03-13T09:01:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-27T09:50:46.000Z (over 5 years ago)
- Last Synced: 2024-11-08T01:10:14.933Z (3 months ago)
- Topics: emotionjs, enzyme, jest, react, reactjs, storybook
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ⚛️ Blank React component
> Blank component when you need to create a new one.
## AiO
Made to work with :
- 👩🎤 [Emotion](https://emotion.sh/) for styles
- 📖 [Storybook](https://storybook.js.org) for doc
- 🧪 [Jest](https://jestjs.io) and [Enzyme](https://airbnb.io/enzyme/) for testsThose are the full recommended dependencies (additional to [CRA deps](https://facebook.github.io/create-react-app/)) :
```sh
$ yarn add @emotion/core @emotion/styled @storybook/react @storybook/theming enzyme enzyme-adapter-react-16 @babel/core babel-loader
```## How to use
### 1. Use from Github
```sh
$ wget https://github.com/Yago/blank-component/archive/master.zip
$ unzip master.zip
$ mv ./blank-component-master/src/Blank ./path/to/components/Blank
$ rm -rf ./master.zip ./blank-component-master
```### 2. Reuse from local
I recommend using [Generact](https://github.com/diegohaz/generact).
```sh
$ generact # and follow the steps
# or
$ mv ./path/to/components/Blank ./path/to/components/NewComponent
# Edit everything```
### 3. New NPM scripts
You can also add the following scripts to your `package.json` :
```json
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
```