Reactive function that returns basic data type

Hi

Maybe I’m missing something, but for sure I’ve got lost due to so many tries and fails with pn.rx.

Scenario
I have my data managed by data store in the separate class. In the app class I want to test subset of my data and based on the result make some actions, typically render different components.

pseudo code


def data_is_empty(data: duckdb.duckdb.DuckDBPyRelation):
    return data.count('date').fetchone()[0] == 0

class MyApp(Viewer):
    my_data = param.ClassSelector(class_=MyDataStore)
    ...
    def __panel__(self):
        test_result = pn.rx(data_is_empty)(self.my_data.data_filtered.filter('some_column > 0'))
        if test_result:
            ....
   ...

actual behaviour
test_result never changes its value. It’s not reactive.
I’ve already tried with other simple data types like int, etc. It’s always the same. I suppose I’m missing some piece of puzzle, but couldn’t find (or missed) information on documentation.
I’ve also tried with pn.bind, but the result is the same.