> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/sdk/api-interface/react-native/components.md).

# Components

### LazyMoveSdk

{% hint style="info" %}
Since MOVE SDK v2.7.0
{% endhint %}

```typescript
import { LazyMoveSdk } from 'react-native-move-sdk';
```

Due to the fact that the application using MOVE SDK will be launched in the background in case of trip detection, all components and all functionality of the application will start working in normal mode, this consumes the memory of the device. The device's operating system may close applications that are running in the background to save memory, and if this happens to the application that is recording the trip, it will negatively affect the result of the trip recording.

The **LazyMoveSdk** wrapper component is designed to minimise the memory usage of the device. This component monitors [AppState](https://reactnative.dev/docs/appstate) and [MoveTripState](https://docs.movesdk.com/move-platform/sdk/models/movetripstate). **LazyMoveSdk** will remove it's **children** in one of the cases:&#x20;

* the app was started in the background&#x20;
* the app is in the background and MoveTripState is `'DRIVING'`, after some delay (*delayToRemoveUiInBackgroundMs*)

When AppState changes back to *'active',* **LazyMoveSdk** will render it's children again, if they were removed.

<table><thead><tr><th width="312">Prop</th><th width="97">Default</th><th>Description</th></tr></thead><tbody><tr><td>delayToRemoveUiInBackgroundMs</td><td>30000</td><td>If the app was in the background and a trip is started - after this delay, the LazyMoveSdk children will be removed.</td></tr></tbody></table>

{% hint style="danger" %}
Please note, that LazyMoveSdk removes it's children. If you have some important logic (for example requests) inside of any child component, it will not be executed.
{% endhint %}

#### Usage example

{% code fullWidth="false" %}

```tsx
import { lazy, useEffect } from 'react';
import { LazyMoveSdk } from 'react-native-move-sdk';

const App = lazy(() => import('./App')); // actual app

const LazyApp = () => (
  <LazyMoveSdk delayToRemoveUiInBackgroundMs={20000}>
    <App />
  </LazyMoveSdk>
);

export default LazyApp;
```

{% endcode %}

{% hint style="info" %}
You can also wrap not the entire application code, but only the part that uses the most memory (like maps, charts, etc.).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.movesdk.com/move-platform/sdk/api-interface/react-native/components.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
