Created
January 14, 2017 08:10
-
-
Save cellog/d4d6c6c2517a880bbbe51fd648d0db39 to your computer and use it in GitHub Desktop.
New system
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, { Component } from 'react' | |
import RenderIfRoute from './RenderIfRoute' | |
import Message from './Message' | |
export default class Inbox extends Component { | |
render() { | |
return ( | |
<div> | |
<h2>Inbox</h2> | |
<RenderIfRoute isActive={state => state.routing.activeRoute === 'message'} component={Message} /> | |
<RenderIfRoute isActive={state => state.routing.activeRoute !== 'message'} component={(props) => <div {...props} />}> | |
Welcome to your Inbox! | |
</RenderIfRoute> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment