title: TypeError: history.push is not a function. In my opi udemy course
body: <p>Im following tutorial on udemy and facing critical problem, what is stopping me from further coding....</p>
  <p>There is no typeo... I have copied sourcecode.
  Im having problem with selecting payment method...
  Im 100% sure is about &quot;type=radio&quot; I just cant select it, and by pressing Continue - error above error is occurring..</p>
  <pre><code>TypeError: history.push is not a function
  submitHandler
  
  
  
    20 |    const submitHandler = (e) =&gt; {
    21 |        e.preventDefault()
    22 |        dispatch(savePaymentMethod(paymentMethod))
  &gt; 23 |        history.push('/placeorder')
       | ^  24 |    }
    25 | 
    26 |    return (
  
  </code></pre>
  <pre><code>function PaymentScreen(history) {
  
      const cart = useSelector(state =&gt; state.cart)
      const { shippingAddress } = cart
      const dispatch = useDispatch()
      const [paymentMethod,setPaymentMethod] = useState('paypal')
  
  
      if(!shippingAddress.address ) {
          history.push('shipping')
      }
  
      const submitHandler = (e) =&gt; {
          e.preventDefault()
          dispatch(savePaymentMethod(paymentMethod))
          history.push('/placeorder')
      }
  
  
      return (
          &lt;FormContainer&gt;
              &lt;CheckoutSteps step1 step2 step3 /&gt;
  
              &lt;Form onSubmit={submitHandler}&gt;
                  &lt;Form.Group&gt;
                      &lt;Form.Label as='legend'&gt;Select Method&lt;/Form.Label&gt;
                      &lt;Col&gt;
                          &lt;Form.Check
                              type='radio'
                              label='PayPal or Credit Card'
                              id='PayPal'
                              name='paymentMethod'
                              checked
                              onChange={(e) =&gt; setPaymentMethod(e.target.value)}
                          &gt;
  
                          &lt;/Form.Check&gt;
                      &lt;/Col&gt;
                  &lt;/Form.Group&gt;
  
                  &lt;Button type='submit' variant='primary'&gt;
                      Continue
                  &lt;/Button&gt;
              &lt;/Form&gt;
          &lt;/FormContainer&gt;
      )
  }
  </code></pre>
  <p>Im not having problem with redirecting(History) im having problem with selecting payment option &quot;type= radio&quot;i triend witch 'type=check' and cant make 'tick' in there, it gives little square text field. Im using old router as it was the only way to get through tutorial... Im using same history method for other steps of my payment and it all works... and because I can't select Payment method then later on i cant do checkout because of missing dictionary going to backend...</p>