title: NextJS this.props + React Toast Notification
body: <p>I'm working on a react application with SSR using NextJS and  <a href="https://github.com/jossmac/react-toast-notifications" rel="nofollow noreferrer"> React Toast Notifications</a>. The package requires I wrap my components with an HOC.</p>
  
  <pre><code>export default withToastManager(developersEdit);
  </code></pre>
  
  <p>But wrapping it with an HOC doesn't allow me to access NextJS this.props anymore. How can I still use NextJS props in my app?</p>
  
  <p>I have tried exporting with a spread operator</p>
  
  <pre><code>export default withToastManager(developersEdit ...this.props);
  </code></pre>
  
  <p>But that didn't work</p>
  
  <pre><code>import React, { Component } from 'react';
  import { withToastManager } from 'react-toast-notifications';
  import getConfig from 'next/config';
  import fetch from 'isomorphic-unfetch';
  
  class developersEdit extends Component  {
    constructor(props) {
      super(props);
      this.state = {
        backgroundImg: 'https://'+this.props.environment.API_URL+'.xyz.com/'+this.props.currentDeveloper.developer_logo,
      }
    }
  
  
    static async getInitialProps (context) {
  
      const { slug } = context.query;
      const {publicRuntimeConfig} = getConfig()
  
      const resDeveloper = await fetch(`https://${publicRuntimeConfig.API_URL}.xyz.com/api/showdeveloper/${slug}`)
      const developer = await resDeveloper.json()
  
      console.log(developer);
      return {
          currentDeveloper: developer.data,
          environment: publicRuntimeConfig,
          slug: slug
      }
  
    }
  }
  
                  ......
  
  export default withToastManager(developersEdit);
  </code></pre>
  
  <p>I want to be able to use this.props and still keep the notification package.</p>