Skip to content

Instantly share code, notes, and snippets.

@mauricedb
Created November 11, 2016 17:16
Show Gist options
  • Save mauricedb/8694dc16e016037131589fc2e87c99ef to your computer and use it in GitHub Desktop.
Save mauricedb/8694dc16e016037131589fc2e87c99ef to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import AppPresentation from './app-presentation';
class AppContainer extends Component {
constructor(props) {
super(props);
this.state = { user: null };
this.x=2;
this.loginAsUser = this.loginAsUser.bind(this);
}
loginAsUser(user) {
this.setState({ user });
}
render() {
const { user } = this.state;
return (
<AppPresentation
user={user}
loginAsUser={this.loginAsUser}
/>
);
}
}
export default AppContainer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment