mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 18:13:09 +08:00
Chore: replace React.FC<Props> with simple function component (#54123)
This commit is contained in:
@ -52,11 +52,11 @@ frame.name = 'http_requests_total';
|
||||
When you're building a panel plugin, the data frames returned by the data source are available from the `data` prop in your panel component.
|
||||
|
||||
```ts
|
||||
const SimplePanel: React.FC<Props> = ({ data }) => {
|
||||
function SimplePanel({ data: Props }) {
|
||||
const frame = data.series[0];
|
||||
|
||||
// ...
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Before you start reading the data, think about what data you expect. For example, to visualize a time series we'd need at least one time field, and one number field.
|
||||
|
Reference in New Issue
Block a user