> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# react-component-defined-in-component

> A component is declared inside another component and rendered as an element, so it remounts on every render and loses its state and DOM.

## What it flags

A component is declared inside another component and rendered as an element, so it remounts on every render and loses its state and DOM.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "react-component-defined-in-component": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.