跳转到内容

Dependency Refresh

watchSource is a convenience feature that replaces the common watch + manual trigger pattern. It auto-refreshes requests when dependencies change.

Manual Dependency Collection

In the example below, switching the radio button auto-refreshes the request.

Auto Collection

Set watchSource to true to auto-collect reactive dependencies within the service function.

API

PropertyTypeDefaultDescription
watchSourcetrue | WatchSource | WatchSource[]-Watch reactive sources, true for auto-collect
watchDeepbooleanfalseDeep watch