Create message from signal then dispatch via AppDispatcher More...
Import Statement: | import |
ActionCreator is a component that listens on its own signals, convert to message then dispatch via AppDispatcher. The message type will be same as the signal name. There has no limitation on the number of arguments and their data type.
For example, you may declare an ActionCreator based component as:
import QtQuick 2.0 import QuickFlux 1.0 pragma singleton ActionCreator { signal open(string url); }
It is equivalent to:
import QtQuick 2.0 import QuickFlux 1.0 pragma singleton Item { function open(url) { AppDispatcher.dispatch(“open”, {url: url}); } }
This property holds the target Dispatcher instance. It will dispatch all the actions to that object.
ActionCreator { dispatcher: Dispatcher { } }
The default value is AppDispatcher