SWAG
SWAG is a straightforward React state manager wich sounds familiar for those who likes View-Model pattern.
Install
npm install --save react-swag
yarn add react-swag
Basic Setup
You will need two things, connect and createStore
★ connect(ReactComponent, Store)
★ createStore(Object or Class)
You get than like this :
Now you would like to create your store, with your data and methods as object properties.
Now you create your presentation layer as a React Component directly accessing your store
now connect your component to the store if you want it to update on store changes
BOOM ! its working.