> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: Root

The default root exported by `@lynx-js/react` for you to render a JSX

## Properties

### ~~registerDataProcessors~~

> **registerDataProcessors**: (`dataProcessorDefinition`: [`DataProcessorDefinition`](/next/api/react/Types/DataProcessorDefinition.md)) => `void`

Register DataProcessors. You MUST call this before `root.render()`.

#### Parameters

| Parameter                 | Type                                                                          |
| ------------------------- | ----------------------------------------------------------------------------- |
| `dataProcessorDefinition` | [`DataProcessorDefinition`](/next/api/react/Types/DataProcessorDefinition.md) |

#### Returns

`void`

#### Deprecated

use [lynx.registerDataProcessors](/next/api/react/Types/Lynx.md#registerdataprocessors) instead

***

### render

> **render**: (`jsx`: `ReactNode`) => `void`

Use this API to pass in your JSX to render

#### Parameters

| Parameter | Type        |
| --------- | ----------- |
| `jsx`     | `ReactNode` |

#### Returns

`void`

#### Examples

```ts
import { root } from "@lynx-js/react"

function App() {
  // Your app
  return <view>...</view>
}

root.render(<App/>);
```

```tsx
import { root } from "@lynx-js/react"

function App() {
  // Your app
  return <view>...</view>
}

if (__MAIN_THREAD__) {
  root.render(
    <DataProvider data={DEFAULT_DATA}>
       <App/>
    </DataProvider>
  );
} else if (__BACKGROUND__) {
  fetchData().then((data) => {
    root.render(
      <DataProvider data={data}>
         <App/>
      </DataProvider>
    ); // You can render later after your data is ready
  })
}
```
