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
named exports and named imports.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
...
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')
}