title: React & Typescript: Property 'id' does not exist on type 'number'
body: <p>Hello everyone who came to help. The code compiles and works, but TypeScript throws an error that Property 'id' does not exist on type 'number'.
  If you look deep into the hook, you can see that the <code>step</code> property is of type <code>number</code> in its interface.</p>
  <p>The error occurs in this entry: step.<strong>id</strong></p>
  <pre><code>import React, { useEffect, useState } from 'react'
  import FirstStep from './steps/firstStep'
  import {useForm, useStep} from 'react-hooks-helper'
  
  interface IDefaultData2 {
      id: string
  }
  
  const steps : any = [
      {id: 'firstStep'},
      {id: 'secondStep'},
      {id: 'thirdStep'},
      {id: 'confirm'},
      {id: 'success'}
  ]
  
  const UserForm: React.FC = () =&gt; {
      const {step, navigation} = useStep({
          steps,
          initialStep: 0
      })
      
      console.log(typeof(step))       // object
      console.log(typeof(step.id))    // string
      console.log(step.id)            // &quot;firstStep&quot;
      
      return (
          &lt;&gt;
          {
              (() =&gt; {
                  switch(step.id){
                      case 'firstStep': return &lt;FirstStep/&gt;
                  }
              })()
          }
          &lt;/&gt;
      )
  }
  
  export default UserForm
  </code></pre>
  <p>What doesn't it like?</p>
  <p><strong>SOLUTION</strong>:</p>
  <ol>
  <li>Add</li>
  </ol>
  <pre><code>interface useStepType {
      step: any,
      navigation: any,
  }
  </code></pre>
  <ol start="2">
  <li>Edit</li>
  </ol>
  <p><strong>From</strong></p>
  <pre><code>const { step, navigation } = useStep({
          steps,
          initialStep: 0
      })
  </code></pre>
  <p><strong>To</strong></p>
  <pre><code>const { step, navigation }: useStepType = useStep({
          steps,
          initialStep: 0
      })
  </code></pre>
  <p>Special thanks to <strong>Tomas Gonzalez</strong></p>