Closed olegantonyan closed 7 years ago
I'll plan to refactor Inesita injections. Adding store
or in this case action_dispatcher
to apllication like this is not modular.
To make Inesita more modular I'll want to do something like this:
$document.ready do
App = Inesita::Application.new(
router: Router,
layout: Layout,
injections: {
store: Store,
dispatcher: Dispatcher
}
).mount_to($document.body)
end
With this approach it possible to inject more than one store
but also dispatcher or anything. You will be able to write a gem with dispatcher and use it.
Hi, Inesita now supports injections
so you can implement and inject dispatcher yourself.
Following Flux architecture. Also helps with https://github.com/inesita-rb/inesita/issues/15 Example usage:
Any comments are welcomed