Skip to content

Instantly share code, notes, and snippets.

@phd20
Created March 22, 2019 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phd20/59fa23b689d292255a75d46ea212b09a to your computer and use it in GitHub Desktop.
Save phd20/59fa23b689d292255a75d46ea212b09a to your computer and use it in GitHub Desktop.
Working version of container that returns array of objects
import { connect } from "react-redux";
import Dashboard from "./dashboard";
import { ApplicationState } from "../../store";
const mapStateToProps = (state: ApplicationState) => {
return {
user: state.oidc.user,
sessions: Object.values(state.sessions.sessions),
};
};
export default connect(mapStateToProps)(Dashboard);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment