Chore: Avoid explicit React.FC<Props> when possible (#64722)
This commit is contained in:
@@ -48,7 +48,7 @@ Wait a minute. Manipulating documents based on data? That's sounds an awful lot
|
||||
In **SimplePanel.tsx**, change `SimplePanel` to return an `svg` with a `rect` element.
|
||||
|
||||
```ts
|
||||
export const SimplePanel: React.FC<Props> = ({ options, data, width, height }) => {
|
||||
export const SimplePanel = ({ options, data, width, height }: Props) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
@@ -196,7 +196,7 @@ import * as d3 from 'd3';
|
||||
|
||||
interface Props extends PanelProps<SimpleOptions> {}
|
||||
|
||||
export const SimplePanel: React.FC<Props> = ({ options, data, width, height }) => {
|
||||
export const SimplePanel = ({ options, data, width, height }: Props) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const values = [4, 8, 15, 16, 23, 42];
|
||||
|
||||
@@ -65,9 +65,9 @@ Let's add a tab for managing server instances.
|
||||
|
||||
```ts
|
||||
import { AppRootProps } from '@grafana/data';
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export const Instances: FC<AppRootProps> = ({ query, path, meta }) => {
|
||||
export const Instances = ({ query, path, meta }: AppRootProps) => {
|
||||
return <p>Hello</p>;
|
||||
};
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user