Skip to content

Instantly share code, notes, and snippets.

@rivertam
Created May 16, 2016 16:17
Show Gist options
  • Save rivertam/5823336013e8e6f46db75ed374121118 to your computer and use it in GitHub Desktop.
Save rivertam/5823336013e8e6f46db75ed374121118 to your computer and use it in GitHub Desktop.
Problematic rendering
render() {
const style = this.getStyles().position ?
this.getStyles() :
absolutePositionStyles(this.props.getCard(), this.getStyles());
const classes = ['bubble'];
if (!this.state.static) {
classes.push('is-animating');
}
const key = this.props.article.slug;
const check = div => {
console.log(`[%cthadiv%c] Rendering tha div for the first time! ${key}`, 'color: purple;', '');
console.log('divvers', div);
};
const div = (
<div key={key} ref={check} className={c(classes)} style={style}>
{this.props.children}
</div>
);
console.log(`[%cthadiv%c] Rendering tha div at all! ${key}`, 'color: purple;', '');
return div;
}
@rivertam
Copy link
Author

Even with no unmounting/remounting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment