Projeto Final - Dev For Tech

GitFlow

Padronização de Código

export function Card({ size, variant, color }: CardProps) {
  return (
    <h1>This is a Card!</h1>
    ...
  )
}
//evitar utilizar 'export default' e 'arrow functions' pra criação de componente
function createDefaultPerson(): Person {
    ...
}
//podemos restringir o uso de 'arrow functions' ao contexto de callbacks

Estrutura de pastas

root
├── src
│   ├── @types
│   ├── assets
│   ├── components
│   │   ├── Header
│   │   ├── ├── index.tsx
│   │   ├── ├── styles.ts
│   │   ├── Card.tsx
...
...
│   ├── pages
│   │   ├── Register
│   │   ├── ├── index.tsx
│   │   ├── ├── styles.ts
│   │   ├── Profile
│   │   ├── ├── index.tsx
│   │   ├── ├── styles.ts
...
...
│   ├── styles
│   │   ├── global.ts
│   ├── services
│   │   ├── api.tsx
│   │   ├── ibge.tsx
...
│   ├── utils
│   │   ├── masks.tsx
│   │   ├── dateFormatter.tsx
...

JSON-Server

rotas:

get('/transactions')
get('/transactions/:id')
post('/transactions')
patch('/transactions/:id')
del('/transactions/:id')

No POST, não é preciso informar o ID, o mirage se encarrega;

const data = {
	title: 'Aluguel',
	type: 'outcome',
	category: 'Residência',
	price: 999.50,
	createdAt: new Date('2022-09-05 11:00:00')
}

Tecnologias/Bibliotecas