@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
37 lines (24 loc) • 1.08 kB
Markdown
---
lang: en
title: 'API docs: context.contextview.observe'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview.observe.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ContextView](./context.contextview.md) > [observe](./context.contextview.observe.md)
## ContextView.observe() method
Listen on `bind` or `unbind` and invalidate the cache
<b>Signature:</b>
```typescript
observe(event: ContextEventType, binding: Readonly<Binding<unknown>>, context: Context): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| event | [ContextEventType](./context.contexteventtype.md) | |
| binding | Readonly<[Binding](./context.binding.md)<!-- --><unknown>> | |
| context | [Context](./context.context.md) | |
<b>Returns:</b>
void