Skip to content

Instantly share code, notes, and snippets.

@floydprice
Last active April 24, 2016 18:27
Show Gist options
  • Save floydprice/3badc0cab8b540b067cd02401cd1ba0c to your computer and use it in GitHub Desktop.
Save floydprice/3badc0cab8b540b067cd02401cd1ba0c to your computer and use it in GitHub Desktop.
import React from 'react'
import {mount} from 'react-mounter';
import HelloWorld2Container from './HelloWorld2Container'
mount(HelloWorld2Container, {someOther: 'props'});
import React from 'react'
class HelloWorld2 extends React.Component{
render() {
return (
<h1>{this.props.title}</h1>
)
}
}
export default HelloWorld2
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)
@tintoverano
Copy link

there's a typo in line 6 above:

let userName = Metoer.user() ? Metoer.user().username : null // Reactive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment