Skip to content

Instantly share code, notes, and snippets.

@typesend
Created February 1, 2016 01:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save typesend/13d2589cf337686e2949 to your computer and use it in GitHub Desktop.
Save typesend/13d2589cf337686e2949 to your computer and use it in GitHub Desktop.
adKMNb
<div id="app"></div>
function blank(value, reveal) {
return reveal ? value : '_____';
}
function EmailAddress(props) {
var names = ['jerry', 'olivia', 'brian', 'steve'];
var user = names.map(function(n) { return n[0] }).join('');
var address = blank(`${user}@${props.domain}`, true);
return <em>{address}</em>;
}
function Subject(props) {
return <em>{props.word || blank()}</em>;
}
var Container = React.createClass({
getInitialState: function() {
return {word: blank()};
},
componentDidMount: function() {
var bugger = this.refs.bugger
setTimeout(function() { bugger.click(); }, 1500);
},
unblankify: function(e) {
this.setState({word: e.target.innerText});
},
render: function() {
return (
<div>
<h3>Thanks for your interest in working at Real HQ!</h3>
<p>
To learn more or to apply, send an email to <EmailAddress domain="realhq.com" /> and include <Subject word={this.state.word} /> in the subject line. Also, let us know how you found this job posting. We won’t dictate the format of your application beyond that, so be thoughtful and creative. The application process will include several interviews, a remote pairing session or coding assignment, and a final, in-person interview (we’ll fly to you). Oh, and step one is modifying the code on this page (there may be <span ref="bugger" onClick={this.unblankify}>bugs</span>) to fill in the blanks above. ;-)
</p>
<p>
Thanks for looking, and good luck!
</p>
</div>
);
}
});
ReactDOM.render(<Container />, document.getElementById('app'));
<script src="https://fb.me/react-0.14.6.min.js"></script>
<script src="https://fb.me/react-dom-0.14.6.min.js"></script>
em {
text-decoration: underline;
font-style: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment