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

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