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
// things.js | |
import React, { Component } from 'react'; | |
import withNavigation from './with_navigation'; | |
// This is just an example component that, when clicked, calls the navigate prop | |
// and is wrapped in withnavigation | |
class Things extends Component { | |
handleNavigate = () => { | |
this.props.Navigation.navigate('/somewhere'); |
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 users from './path-to-users-necto'; | |
store.dispatch( | |
users.Actions.someAction( | |
'User clicked some button', | |
{ foo: 'someFooChange' }, | |
{ someMeta: 'someMeta' } | |
) | |
); | |
/* |
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 Necto from 'necto'; | |
const users = new Necto('users', { | |
initialState: { | |
foo: 'bar', | |
bar: 'foo', | |
}, | |
}); | |
export const someAction = users.createFlow( |
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 Constants from './constants'; | |
export const someAction = foo => ({ | |
type: Constants.SOME_ACTION, | |
foo, | |
}); | |
export const someOtherAsyncAction = bar => ({ | |
type: Constants.SOME_OTHER_ASYNC_ACTION, | |
bar, | |
}); |
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
checkPropTypes = require("./helpers/prop_types").checkPropTypes | |
_.extend Marionette.View.prototype, | |
checkPropTypes: () -> | |
if @propTypes then checkPropTypes.apply(@, arguments) | |
return this |