Last active
April 24, 2016 18:27
-
-
Save floydprice/3badc0cab8b540b067cd02401cd1ba0c to your computer and use it in GitHub Desktop.
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 React from 'react' | |
import {mount} from 'react-mounter'; | |
import HelloWorld2Container from './HelloWorld2Container' | |
mount(HelloWorld2Container, {someOther: 'props'}); |
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 React from 'react' | |
class HelloWorld2 extends React.Component{ | |
render() { | |
return ( | |
<h1>{this.props.title}</h1> | |
) | |
} | |
} | |
export default HelloWorld2 |
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 React from 'react' | |
import {composeWithTracker} from 'react-komposer' | |
import HelloWorld2 from './HelloWorld2' | |
const compose = (props, onData) => { | |
let userName = Metoer.user() ? Metoer.user().username : null // Reactive | |
onData(null, {title: userName}) | |
} | |
export default composeWithTracker(compose)(HelloWorld2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there's a typo in line 6 above: