StyleGuide: Update frontend style guide (#52471)

We should not explicitly type the return type for React functional components.
This commit is contained in:
Torkel Ödegaard 2022-07-19 19:12:11 +02:00 committed by GitHub
parent 094dfd0d4d
commit dfce454eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,7 +351,7 @@ static defaultProps: Partial<Props> = { ... }
We recommend using named regular functions when creating a new react functional component.
```typescript
export function Component(props: Props): ReactElement { ... }
export function Component(props: Props) { ... }
```
## State management