Vodka
Vodka is a class to easily help build reducers and sagas for you. Vodka also manages tree like structure for objects of objects
Install
Yarn
yarn add react-vodka
npm
npm install react-vodka --save
Example usage
// mixers.js ; const vodka = baseUrl: 'https://api.bookstore.local' headers: 'Content-Type': 'application/json' ; vodka; // Create a mapped child module of books vodka; // Create a mapped child module of pages vodka; //additional example vodka; // Muiltple shots example vodka; ;
Install Vodka into your app
;;;;;;;;;;;;;; ;; const reducers = ; const sagas = ...vodka; const browserHistory = ;const store = ;const history = ; ; ReactDOM; if processenvNODE_ENV !== 'production' windowReact = React;
Vodka also comes with an Auth class to easily build an auth saga and reducer.
; const auth = baseUrl: 'http://localhost:8000/admin' register:false; const vodka = baseUrl: 'http://localhost:8000/admin' auth: auth; ;
Local package development
git clone yarn && yarn build && npm link
TODO
- Need to find a way to add a trailing slash if outgoing url doesn't already have one
- Need to figure out how to have a manageable config object
- Need to replace child's parent's reducer function with an object with child's key as a property
- Need to add sagas to manage children easier rather than update parent each time
- Figure out how to export a immutable object/array
- Rename Vodka file to index
- Build package and install in stylique app for testing properly
- Have a go at building a routes component
- Refactor child to parent method calling by removing parent, name object
- Make sure child reducer types do not conflict with parent's
- Test that sagas work correctly
- Test child setup
- Update dependencies
- Rewrite README
Not so important right now
- Add custom reducer methods to vodka function config
- Add custom saga methods to vodka function config