Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/youknowriad/react-redux-auth-poc
https://github.com/youknowriad/react-redux-auth-poc
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/youknowriad/react-redux-auth-poc
- Owner: youknowriad
- Created: 2016-03-01T15:20:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-10T17:53:21.000Z (almost 9 years ago)
- Last Synced: 2024-11-09T05:35:59.304Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Some Authentication utilities
=============================Requires, redux, redux-saga and redux-form
## bootstrap
```javascript
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import createSagaMiddleware from 'redux-saga'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { reducer as form } from 'redux-form'
import { fork } from 'redux-saga/effects'// Loading module content
import { reducers as authReducers, createAuthenticationSaga, createLoginForm } from './index'function* rootSaga() {
yield fork(createAuthenticationSaga('http://myendpoint'))
}const reducer = combineReducers({
form,
authentication: authReducers.authentication,
loginForm: authReducers.loginForm
})const store = createStore(reducer, applyMiddleware(createSagaMiddleware(rootSaga)))
const LoginForm = createLoginForm('loginForm')
const Home = () => (
)render(
,
document.getElementById('root')
)
```