Introduction
What is the problem?
One of the most basic problems in developing complicated applications is the State Management. There are a lot of Architecture Patterns and libraries which offers different solutions every of each has own pros and cons. The most problematic zone is the price of adding and using tools - changing architecture, creating new entities, changing patterns.
Searching for the best library for State Management I`ve found out that there a lot of good ideas in the community, but they are exist in different projects and balanced by some inconvenient, inflexible or just bad solutions.
So that's why I'
ve decided not to put up with compromises but create something that would not depress me everytime when I`d think "that could be designed better!", but motivate cause I can change it.
What is the solution?
I think that Event-Driven architecture is the most flexible way to design modular systems. Things are happen when they should happen. No unnessesary waiting for actions, just dispatching Event and handlers would do they work.
So that the engine of FoxStore is EventDispatcher. It schedules the Event Stream which can Listen every module. It is just event bus that distribute events throught the app to every subscriber.
Make solutions, not problems
One of the main idea of Foxstore is that everything that library can do itselfs - it should do itselfs. It doesn't matter, what is the process - Event Scheduling, distributing, connection of dispatcher and handlers, managing store transactions, saving state, etc. Any tool I'am using should solve my problems but not create another.
That's why another fundamental of Foxstore - to configure once and use.
But it doesn't mean that you has one Store to one App. On the contrary, you can (and should, I think) to create Store for every feature-module where you need it.
Every Store can be one file that describes logic of your module. But if you EventScheme is too big, you can split it into files and reuse some schemes, derive it.
Installation
Available in npm
Documentation
Source code
Last updated