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
class Customers extends React.Component { | |
componentDidMount() { | |
this.props.request(); | |
} | |
render() { | |
const { customers } = this.props; | |
const list = customers.map(customer => (<CustomerRow data={customer} />); | |
/* |
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
const CustomerRow = ({ customer: { name, email } }) => ( | |
<div className="ustomers-grid__row"> | |
<div className="ustomers-grid__row-name">{name}</div> | |
<div className="ustomers-grid__row-email">{email}</div> | |
</div> | |
); | |
const Customers = ({ customers }) => { | |
const list = customers.map(customer => (<CustomerRow customer={customer} />); | |
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
const Customers = ({ customers }) => ( | |
<div className="customers-grid"> | |
<Toolbar /> | |
<Grid rows={ | |
customers.map(customer => ( | |
<div className="ustomers-grid__row"> | |
<div className="ustomers-grid__row-name">{customer.name}</div> | |
<div className="ustomers-grid__row-email">{customer.email}</div> | |
</div> | |
) |
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
const user = { | |
name: 'Christiano Milfont', | |
email: '[email protected]', | |
}; | |
const template = '<div>' + user.name + ' - <span>' + user.email + '</span><div>'; |
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
function A(name) { | |
this.name = name || 'Christiano'; | |
return this.name; | |
} | |
function B() { | |
this.surname = 'Milfont'; | |
this.getName = function() { | |
return `${this.name} - ${this.surname}`; |
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
# with installed nvm | |
# Install SDK Android - https://facebook.github.io/react-native/docs/getting-started.html | |
# Appearance & Behavior → System Settings → Android SDK | |
# SDK Platforms: Android 6.0 (Marshmallow) | |
# Launch Standalone SDK Manager -> Tools -> 23.0.1 | |
# Configure ~/.profile | |
export NVM_DIR="/Users/cmilfont/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" |
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'; | |
import { connect } from 'react-redux'; | |
import FormContainer from './form.jsx'; | |
import List from './List.jsx'; | |
/* Export function to unit tests */ | |
export const TodoList = (todos, create) => ( | |
<div> | |
<FormContainer submit={create} /> | |
<List todos={todos} /> |
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
const models = require('./server/models'); | |
const email = '[email protected]'; | |
async function fetchData(email) { | |
const [user, kind] = await Promise.all([ | |
models.User.findOne({ | |
where: { email } | |
}), | |
models.Kind.findOne({ |
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 FormContainer from './container'; | |
@connect(state => ({ openNewFeedback: state.openNewFeedback })) | |
export default class Form extends React.Component { | |
static propTypes = { | |
openNewFeedback: React.PropTypes.bool, | |
dispatch: React.PropTypes.func, | |
actions: React.PropTypes.any, |