title: Send param to fetch in getInitialProps react and nextjs
body: <p>I 'm traying to send a param to getInitialProp function to made the fecth to the correct json.</p>
  
  <p>here is my code:
  hepler.js -->  here I made the fetch per se.</p>
  
  <pre><code>export async function getEvents() {
    const res = await fetch("https://url/eventos.json");
    let new_data = await res.json();
  
    return { events: new_data.data };
  }
  
  export async function getDetails(slug) {
    const res = await fetch(`https://myurl/${slug}.json`);
    let data_detail_event = await res.json();
    return { data_detail_event };
  }
  </code></pre>
  
  <p>_app.js // here I have the getInitialProps and works great</p>
  
  <pre><code>import App from "next/app";
  import ContextProvider from "../provider/ContextProvider";
  import fetch from "isomorphic-unfetch";
  import {getEvents, getDetails} from '../helper/index'
  
  export default class MyApp extends App {
    static async getInitialProps() {
  
      const events = await getEvents();
      return {
        events : events.events
      };
    }
  
    render() {
      const { Component, pageProps } = this.props;
      return (
        &lt;div&gt;
          &lt;ContextProvider events={this.props.events} &gt;
            &lt;Component {...pageProps} /&gt;
          &lt;/ContextProvider&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>pages/[id].js</p>
  
  <pre><code>import { useRouter } from "next/router";
  import Context from "../../config/Context";
  /* Components */
  import WordCounter from "../../components/word-counter/WordCounter";
  
  function Post(props) {
    const router = useRouter();
    const context = React.useContext(Context);
    return (
      &lt;React.Fragment&gt;
       &lt;WordCounter /&gt;
      &lt;/React.Fragment&gt;
    );
  }
  Post.getInitialProps = async ({ query}) =&gt; {
    const detail = await getDetail(query.id) --&gt; here I send the param and it seems never arrive to helper.js, why?
    return {detail}
  }
  export default  Post
  </code></pre>
  
  <p>Where is the problem? HELP!
  THAANKS!</p>