import React, { Component, PropTypes } from 'react'; import { createContainer } from 'meteor/react-meteor-data'; import Chat from './component'; class ChatContainer extends Component { constructor(props) { super(props); this.state = { currentChat: null, }; } componentDidMount() { const chatID = this.props.params.id || 'public'; this.setState({ currentChat: chatID }); } render() { const { chatID, ...props } = this.props.params; return ( {this.props.children} ); } } export default createContainer(() => { return {}; }, ChatContainer);