title: next.js - dynamic route consisting of multiple slugs?
body: <p>Is it possible to structure a route that contains dynamic parts in predefined format, such as <code>/[name]-id[id]</code>, for example to have routes <code>/bob-id303</code> or <code>/mary-id205</code>?</p>
  <p>What I tried is create a file <em>[name]-id[id].js</em>. Inside <code>getInitialProps</code> I console.log the <code>ctx</code> and it contains</p>
  <pre><code>  pathname: '/[name]-id[id]',
    query: { 'name]-id[id': 'bob-id303' },
    asPath: '/bob-id303',
  </code></pre>
  <p>On the other hand, calling the file <em>[[name]]-id[id]].js</em> gives</p>
  <pre><code>Failed to reload dynamic routes: Error: Optional route parameters are not yet supported (&quot;[[name]-id[id]]&quot;).
  </code></pre>
  <p>I'd like to get the <code>name</code> and <code>id</code> directly, then pass them through initial props to the page. I'm aware I can parse <code>asPath</code>, but is there another way to do this?</p>