Question: Within the scope of a new project in Qt/QML, We are currently looking for an application architecture. We are thinking about an implementation of the Flux architecture from Facebook.

I found this good library which makes it in some ways : <https://github.com/benlau/quickflux>

In our case, we would like to manage Stores and Actions in C++. However, there is a problem in making a Flux implementation for C++. That is the data type to be passed to Dispatcher. C++ is strong type language but Dispatcher allows any kind of data to be passed to the dispatch() function. It could use QVariant type just like what Quick Flux did. But I think C++ developer do not really like this approach. 

Would you have a way to resolve this problem ?

Thanks for you anwsers

Answer: 
My answer may be outdated, but perhaps will help someone having the same question...

You can try to use C++/Qt implementation of Flux-like application pattern <https://github.com/eandritskiy/flux_qt>

Please check QML example. 

There are only 2 classes that are exported to QML engine: ActionProvider and Store. ActionProvider is responsible for the action generation in a whole app (in QML part and in C++ part also). Store provides its properties(that are used in property bindings) to QML elements. All Store properties are changed in a controlled manner in a C++ part. 

P.S.
If you'd prefer pure C++ implementation please check 
<https://github.com/eandritskiy/flux_cpp> (but be sure that your compiler supports C++17 std::any)
It makes sense to consider a Flux-like app architecture as Ben Lau suggests.

However, for simple QML-driven apps an easier implementation of the same pattern is also possible. Especially since the introduction of Qt Quick Compiler, there's really no need to dive into complex C++ code.

You can find a simple guide for QML-driven apps that rely ensure a uni-direction data-flow (like Flux) here: [How to structure QML-driven apps](https://v-play.net/apps/avoid-cpp-models-qt)

It also covers Qt architecture basics and when to best use QML vs C++.