An open API service indexing awesome lists of open source software.

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

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`.