title: Props Match Params Id can't be read and Props.id is Undefined
body: <p>If I am using  <strong>const currentUserId = props.id</strong> then the error will be <strong>props.match is undefined</strong>, and the variable &quot;userId&quot; even is undefined when i am trying to console log.
  <a href="https://i.stack.imgur.com/t7Nlo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t7Nlo.png" alt="enter image description here" /></a></p>
  <p>Then, I using <strong>props.match.params.id</strong> the code can't even being read, it's only blank
  <a href="https://i.stack.imgur.com/i3kEp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i3kEp.png" alt="enter image description here" /></a></p>
  <p>Im also trying to modify the code become <strong>const currentUserId = props.computedMatch.params.id;</strong> but nothing works
  <a href="https://i.stack.imgur.com/i5vQA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5vQA.png" alt="enter image description here" /></a></p>
  <p>My code:</p>
  <pre><code>import React, {useContext, useState, useEffect} from 'react';
  import { GlobalContext } from '../context/GlobalState';
  import { Link, useNavigate } from 'react-router-dom';
  import { v4 as uuid } from 'uuid';
  import {
    Form,
    FormGroup,
    Label,
    Input,
    Button
  } from 'reactstrap';
  
  export const EditUser = (props) =&gt; {
    const [selectedUser, setSelectedUser] = useState({
      id: '',
      name: ''
    });
    const { users, editUser } = useContext(GlobalContext);
    const history = useNavigate();
    const currentUserId = props.match.params.id;
  
    useEffect(() =&gt; {
      const userId = currentUserId;
      console.log(typeof userId);
      const selectedUser = users.find(user =&gt; user.id === Number(userId))
      setSelectedUser(selectedUser)
      console.log(selectedUser);
    }, [currentUserId, users])
  
    const onSubmit = () =&gt; {
    
      history('/');
    }
  
    const onChange = (e) =&gt; {
  
    }
    return (
      &lt;Form onSubmit={onSubmit}&gt;
        &lt;FormGroup&gt;
          &lt;Label&gt;Nama&lt;/Label&gt;
          &lt;Input type='text' onChange={onChange} placeholder='Ganti Nama Disini!'&gt;&lt;/Input&gt;
        &lt;/FormGroup&gt;
        &lt;Button type='submit'&gt;Edit Data&lt;/Button&gt;
        &lt;Link to=&quot;/&quot; className=&quot;btn btn-danger ml-2&quot; style={{ marginLeft: &quot;10px&quot;}}&gt;Cancel&lt;/Link&gt;
      &lt;/Form&gt;
    )
  }
  </code></pre>