Backand SDK for Redux. This SDK enables you to communicate comfortably and quickly with your Backand app
JavaScript
Latest commit 948b240 Dec 22, 2016 @rannn505 rannn505 export bug
Permalink
Failed to load latest commit information.
example ready for npm 1.0.0 Dec 18, 2016
src export bug Dec 21, 2016
.gitignore ready for npm 1.0.0 Dec 18, 2016
README.md export bug Dec 21, 2016
index.js export bug Dec 21, 2016
package.json export bug Dec 21, 2016

README.md

reduxbknd-sdk

npm version npm downloads

Backand SDK for Redux. This SDK enables you to communicate comfortably and quickly with your Backand app. It wraps the vanillabknd-sdk to allow easier work on projects involving Redux.

Installation

  • NPM:
$ npm i -S reduxbknd-sdk
import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'

createStore(rootReducer, initialState, applyMiddleware(thunk))
  • Use npm run generate OBJ to generate Types,Actions,Reducers for your Backand objects:
$ cd ./node_modules/reduxbknd-sdk/
$ npm run generate obj1 obj2 obj3... (CREATE OBJECTS)
$ npm run generate mode=del obj1 obj2 obj3... (DELETE OBJECTS)
import { combineReducers } from 'redux'
import user from './node_modules/reduxbknd-sdk/src/auth/authReducer'
import obj1 from './node_modules/reduxbknd-sdk/src/obj1/obj1Reducer'
import obj2 from './node_modules/reduxbknd-sdk/src/obj2/obj2Reducer'

combineReducers({
  user,
  obj1,
  obj2
})
  • Import Actions and dispatch them happily! 😄
import { getUserDetails, signin, useAnonymousAuth, signout } from './node_modules/reduxbknd-sdk/src/auth/authActions'

store.dispatch(signin(username, password))
store.dispatch(getUserDetails())

Examples

License

MIT