Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 18065

How to handle watching of a reactive/non-reactive value as short as possible?

$
0
0

I have a list dropdown component that accepts items props which could be a reactive or non-reactive object/array.So I watch it to react when the items change. But when I provide a static non-reactive array/object it issues warning that non-reactive value is provided for watch(). Yes, I don't care watching a non-reactive value.

Unfortunately there's no isReactive() so I wonder how can I check whether a value is reactive or not? I need some short code to make watch() working without warnings in such cases


Viewing all articles
Browse latest Browse all 18065

Trending Articles