getndazn / kopytko-framework

A modern Roku's Brightscript framework based on JS world's solutions
MIT License
19 stars 6 forks source link

Store - allow to fire subscriber in the given context #18

Closed tomek-r closed 1 year ago

tomek-r commented 2 years ago

This is a Feature Proposal

Description

Store implements subscribe and subscribeOnce methods. The callbacks are fired in the component's scope only. Allow the store to fire its subscribers in the given context like:

StoreFacade().subscribe("start", m._onStart, m)

' in the store's _notify function:
functionCall(listener.callback[0], [value], m)