https://github.com/zoltan-nz/products-app-react-ts
https://github.com/zoltan-nz/products-app-react-ts
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zoltan-nz/products-app-react-ts
- Owner: zoltan-nz
- Created: 2020-09-01T06:24:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T01:22:38.000Z (almost 5 years ago)
- Last Synced: 2025-01-22T02:46:10.888Z (9 months ago)
- Language: TypeScript
- Size: 198 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contacts App with React and TypeScript
## Create
```bash
$ yarn create react-app contacts-app --template typescript
```## Add Prettier
```
$ yarn add -D prettier
```Add the configuration to `package.json`:
```
"prettier": {
"printWidth": 120,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "es5"
}
```## Playing with simple tasks
1. Change title.
2. Add a static variable, show on the screen.
3. Create a `label` and `input` with `value` and `defaultValue`.
4. Create `button` with a `onClick` callback.
5. Connect `input` with `onChange`.
6. Create a simple store, an empty array.
7. Add new contact to the list
8. Print the list## Setup folder structure
- Clean up dummy content
- Create folders: `components`, `pages`.