So whenever I clicked the View Profile Link
<Link to={`/profile/${_id}`} className="btn btn-primary">
View Profile
</Link>
It shows in the URL the User ID of the Profile which is Good.
But whenever I Clicked it to Match it with this Button I get an error.
const Profile = ({ getProfileById, match }) => {
useEffect(() => {
getProfileById(match.params.id);
}, [getProfileById]);
return <div>test</div>;
};
I get on my console
React Hook useEffect has a missing dependency: 'match.params.id'. Either include it or remove the dependency array
this is what is in my app Js.
<Route
exact
path="/profile/:id"
component={Profile}
/>
I think it doesn't match with the URL to the button I clicked.
and inside the Redux Devtools it only returns a Profile Error.



