# Env.DocsMode.offDocsModeChange
Unlistens for doc mode changes , the method is called asynchronously.

## Availability description

Permission requirements | View Available Description | Platform is available | scene
---|---|---|---
Readable | All views | - PC<br>- Mobile | Presentation mode

## Input

| **Name** | **Data type**         | **Is required** | **Description**          |
| -------- | --------------------- | --------------- | ------------------------ |
| handler  | DocsModeChangeHandler | Yes             | Doc mode change listener |

### DarkModeChangeHandler

```
type DocsModeChangeHandler = (docsMode: DOCS_MODE) => void;
```
| **key** | **value** | **Description**                                                             |
| ------- | --------- | --------------------------------------------------------------------------- |
| EDITING | EDITING   | edit status                                                                 |
| NONE    | NONE      | No configuration                                                            |
| READING | READING   | Reading mode                                                                |
| UNKNOWN | UNKNOWN   | Unknown: template injection failed, or did not refresh to switch to new doc |

## Output

No

## Example code

### Calling example

```js
const DocMiniApp = new BlockitClient().initAPI();
const docsModeChangeHandler = (docsMode: DOCS_MODE) => {
        console.log('debug', docsMode);
    };
useEffect(() => {
    docMiniApp.Env.DocsMode.onDocsModeChange(docsModeChangeHandler);
    return () => {
        docMiniApp.Env.DocsMode.offDocsModeChange(docsModeChangeHandler);
    };
});
```

### Return example

No