The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/docs/sources/packages_api/ui/renderorcalltorender.md

1.1 KiB

+++

-----------------------------------------------------------------------

Do not edit this file. It is automatically generated by API Documenter.

-----------------------------------------------------------------------

title = "renderOrCallToRender" keywords = ["grafana","documentation","sdk","@grafana/ui"] type = "docs" +++

renderOrCallToRender() function

renderOrCallToRender() function

Given react node or function returns element accordingly

Signature

export declare function renderOrCallToRender<TProps = any>(itemToRender: ((props?: TProps) => React.ReactNode) | React.ReactNode, props?: TProps): React.ReactNode;

Import

import { renderOrCallToRender } from '@grafana/ui';

Parameters

Parameter Type Description
itemToRender ((props?: TProps) => React.ReactNode) | React.ReactNode
props TProps props to be passed to the function if item provided as such

Returns:

React.ReactNode