This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactReconciler from 'react-reconciler'; | |
const hostConfig = {}; | |
const ReactReconcilerInst = ReactReconciler(hostConfig); | |
export default { | |
render: (reactElement, domElement, callback) => { | |
console.log(arguments); | |
// Create a root Container if it doesnt exist | |
if (!domElement._rootContainer) { | |
domElement._rootContainer = ReactReconcilerInst.createContainer(domElement, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const { types, actions, rootReducer, rootSaga } = createStar({ | |
name: 'blogItem', | |
log: true, | |
graphql: { | |
client: apolloClient, | |
add: { | |
getBlogItems: { | |
query: gql` | |
query { | |
allBlogItems { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
users: { | |
getUsers: { | |
loading: false, | |
data: null, | |
error: null | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
import * as Users from '../stars/users'; | |
const appReducer = combineReducers({ | |
users: Users.rootReducer | |
}); | |
function* rootSaga(args) { | |
yield fork(Users.rootSaga, args); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStar } from 'redux-nakshatra'; | |
import { take, put, race, select } from 'redux-saga/effects'; | |
import { MediaPlayerStatus } from '../constants/mediaPlayerStatus'; | |
import { Howl } from 'howler'; | |
const MediaPlayerActionTypes = { | |
playPause_REQUEST: 'playPause_REQUEST', | |
playPause_SUCCESS: 'playPause_SUCCESS', | |
playPause_FAILURE: 'playPause_FAILURE', | |
updateCurrentTrack_REQUEST: 'updateCurrentTrack_REQUEST', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { take, call, put, all, fork, race, select } from 'redux-saga/effects'; | |
import { createStar } from 'redux-nakshatra'; | |
import axios from 'axios'; | |
export const { rootSaga, types, actions, rootReducer } = createStar({ | |
name: 'users', | |
http: { | |
url: 'http://localhost:5000/users', | |
generateDefault: true | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStar } from 'redux-nakshatra'; | |
export const { rootSaga, types, actions, rootReducer } = createStar({ | |
name: 'users', | |
http: { | |
url: 'http://localhost:5000/users', | |
generateDefault: true, | |
add: { | |
findUsersByLastName: { | |
method: 'get' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStar } from 'redux-nakshatra'; | |
export const { rootSaga, types, actions, rootReducer } = createStar({ | |
name: 'users', | |
http: { | |
url: 'http://localhost:5000/users', | |
generateDefault: true, | |
override: { | |
getUser: { | |
url: 'http://localhost:5000/user/:id' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStar } from 'redux-nakshatra'; | |
export const { rootSaga, types, actions, rootReducer } = createStar({ | |
name: 'users', | |
http: { | |
url: 'http://localhost:5000/users', | |
generateDefault: true, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStar } from 'redux-nakshatra'; | |
export const { rootSaga, types, actions, rootReducer } = createStar({ | |
name: 'users', | |
http: { | |
url: 'http://localhost:5000/users', | |
add: { | |
getUsers: { | |
method: 'get' | |
}, |