79155485

Date: 2024-11-04 12:41:25
Score: 1
Natty:
Report link
to resolve this problem you muss use useParams() and use useEffect() if you want conection with API
const [user,setUser]=useState('');
let param=useParams();
param.id!=null ? useEffect(()=>{
getUserOne(param.id)
.then((res)=>setUser(res.data))enter code here
.catch(()=>console.log('there is wrong'));
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: محمد رمضان