mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
StyleGuide: Update frontend style guide (#52471)
We should not explicitly type the return type for React functional components.
This commit is contained in:
parent
094dfd0d4d
commit
dfce454eca
@ -351,7 +351,7 @@ static defaultProps: Partial<Props> = { ... }
|
|||||||
We recommend using named regular functions when creating a new react functional component.
|
We recommend using named regular functions when creating a new react functional component.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export function Component(props: Props): ReactElement { ... }
|
export function Component(props: Props) { ... }
|
||||||
```
|
```
|
||||||
|
|
||||||
## State management
|
## State management
|
||||||
|
Loading…
Reference in New Issue
Block a user