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 Flux from './Flux.js' | |
import Flux from './components/App.jsx' | |
// Within document ready | |
const payload = document.getElementById('payload'); | |
const flux = new AppFlux(); | |
flux.serialize(payload); |
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 { createAction } from 'redux-actions'; | |
import * as WebUtils from '../webUtils/index'; | |
import { | |
SELECT_MEAL, | |
UPDATE_MEAL_PROP, | |
BEGIN_CREATING_MEAL, | |
SUCCESS_CREATING_MEAL, | |
ERROR_CREATING_MEAL, | |
BEGIN_LOADING_MEALS, |
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
// The Redux Store | |
{ | |
posts : [{ | |
...stuff, | |
userId: 1 | |
tagIds: [1,2,3] | |
}], | |
users: [{ | |
...stuff, |
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 { | |
updateRouterState | |
} from '../actions/RouterActions'; | |
function mapStateToProps(store) { | |
return {} | |
} | |
function mapDispatchToProps(dispatch) { | |
return { |
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 React from 'react' | |
import Header from '../components/people/PeopleHeader' | |
import Footer from '../components/people/PeopleFooter' | |
import Filtering from '../components/people/FilteringConnector' | |
import Toolbar from '../components/people/PeopleToolbarConnector' | |
import Table from '../components/people/PeopleTableConnector' | |
import EmptyBar from '../components/people/PeopleEmptyBarConnector' | |
export default class People { |
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 React from 'react'; | |
import { connect } from 'react-redux'; | |
import { mapPeopleToolbarStateToProps } from '../../../selectors/peopleSelector'; | |
import PeopleToolbar from './PeopleToolbar'; | |
class PeopleToolbarConnector { | |
render() { | |
return ( | |
<PeopleToolbar {...this.props} /> |
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
require('babel/register'); | |
// Extend to use css-modules server compiler. | |
// This will resolve JS objects rather than nothing, thus fixing | |
// nested object use - styles.thing.otherThing | |
require.extensions['.css'] = function (module, filename) { | |
return {} | |
} |
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 function mapPersonStateToProps(store) { | |
const validationErrors = personValidator(store.person.editableResource) | |
return { | |
validationErrors: validationErrors, | |
...restOfPropsFromStore | |
} | |
} |
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 function beginCreatingAttachment(attachment, type) { | |
return function(dispatch) { | |
const file = attachment.file | |
delete attachment.file | |
return AttachmentWebUtils.postAttachmentForAWSCredentials(attachment).then((response) => { | |
const s3Data = response.uploadSignature.fields | |
const url = response.uploadSignature.host | |
const attachmentId = response.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 React, { PropTypes } from 'react' | |
export default class Dumb { | |
static propTypes = { | |
... | |
} | |
render() { | |
return ( |