+++
# -----------------------------------------------------------------------
# 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

<b>Signature</b>

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

```typescript
import { renderOrCallToRender } from '@grafana/ui';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  itemToRender | <code>((props?: TProps) =&gt; React.ReactNode) &#124; React.ReactNode</code> |  |
|  props | <code>TProps</code> | props to be passed to the function if item provided as such |

<b>Returns:</b>

`React.ReactNode`

