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
// So instead of this | |
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; | |
// Use this | |
import { CSSTransitionGroup } from 'react-transition-group' |
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
{"lastUpload":"2017-10-08T05:17:03.032Z","extensionVersion":"v2.8.2"} |
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
'use strict'; | |
const appUserRepository = require('../data/repositories/appUserRepository'); | |
const saveAppUser = (profile) => { | |
return new Promise((resolve, reject) => { | |
Promise.resolve().then(() => { | |
return appUserRepository.getAppUserByFacebookId(profile.id); | |
}).then((appUser) => { | |
if (appUser) { |
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
.box { | |
background-color: yellow; | |
border: solid 1px black; | |
height: 100px; | |
width: 100px; | |
opacity: 1.0; | |
box-sizing: border-box; | |
transition: height 500ms 0ms, opacity 500ms 500ms; | |
} |
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
.todo-item { | |
width: 100px; | |
height: 100px; | |
background-color: red; | |
float: left; | |
border: solid 2px white; | |
box-sizing: border-box; | |
} | |
.example-enter { |
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 ReactCSSTransitionGroup from 'react-addons-css-transition-group'; | |
const Example = ({items, removeItemHandler}) => { | |
return ( | |
<div> | |
<ReactCSSTransitionGroup transitionName="example" transitionEnterTimeout={700} transitionLeaveTimeout={700}> | |
{items.map(function(item) { | |
return ( | |
<div key={item.id} className="todo-item" onClick={removeItemHandler.bind(null, item)}> |
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
.example-component { | |
width: 100px; | |
height: 100px; | |
background-color: red; | |
-webkit-transition: 0.5s; | |
-moz-transition: 0.5s; | |
-o-transition: 0.5s; | |
transition: 0.5s; | |
opacity: 0; | |
visibility: hidden; |
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'; | |
const ExampleComponent = ({show}) => { | |
const componentClasses = ['example-component']; | |
if (show) { componentClasses.push('show'); } | |
return ( | |
<div className={componentClasses.join(' ')}></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
import React from 'react'; | |
import {findDOMNode} from 'React-dom'; | |
class ExampleComponent extends React.Component{ | |
constructor (props) { | |
super(props); | |
} | |
componentWillReceiveProps(nextProps) { | |
if (nextProps.visible !== this.props.visible) { |