title: Pass data from page to another
body: <p>I recently started working with next.js, although I already have some experience with react, I have the following folder structure:</p>
  <pre><code>/segments 
    -index.js
    -[slug].js
  </code></pre>
  <p>Scenario: On page <code> [url] / segments</code> I get the list of segments by making a call to my api, which returns an array with all the information for each segment -&gt; I display the list of segments for the user -&gt; User chooses the segment and navigates to <code> [url] / segments / slug</code>. At this point I would like that on this page <code>[slug] .js</code> to receive the segment that the user chose (since everything I need is already in the object) without the need for another call to the api.
  I know I can use context for this, but I was wondering if next.js can solve this problem without having to use the global scope. Just passing a fetched data on one page to another.
  Thanks All</p>