Created
January 17, 2016 22:25
-
-
Save jbaxleyiii/4790fe1becab637af20c to your computer and use it in GitHub Desktop.
Modal Prototyping with Apollos
This file contains 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
/* Sample injection for modal */ | |
import React, { Component, PropTypes } from "react" | |
import { connect } from "react-redux" | |
import modalActions from "apollos/core/store/modal" | |
const SampleUIContainer = React.createClass({ | |
componentWillMount(){ | |
this.props.render(this.SampleUI, { name: "Ed" }) | |
}, | |
componentDidUpdate(){ | |
console.log("here") | |
this.props.render(this.SampleUI, { name: "Ed" }) | |
}, | |
SampleUI: ({ name }) => ( | |
<div className="soft-double-ends soft-sides"> | |
<h1> Hello {name}!</h1> | |
</div> | |
), | |
render() { | |
return <div></div> | |
} | |
}) | |
export default connect( | |
null, | |
modalActions | |
)(SampleUIContainer) |
This file contains 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 { Wrapper } from "apollos" | |
import { Routes } from "app/client" | |
import Give from "apollos/give" | |
import Profile from "apollos/profile" | |
import Groups from "apollos/groups" | |
import Recover from "./Recover.jsx" | |
Give.childRoutes.push({ | |
component: Recover, | |
path: "recover" | |
}) | |
ReactRouterSSR.Run({ | |
component: Wrapper, | |
childRoutes: [ | |
Routes, | |
Give, | |
Profile, | |
Groups | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment