const [autor, setAutor] = useState({ auth: null }); const [blog, setBlog] = useState({}); let { id } = useParams(); const navigate = useNavigate(); useEffect(() => { const fetching = async () => { const { data } = await axios.get(`/api/blogs/${id}`); const respAuth = await axios(`/api/users/all`); setAutor({ auth: respAuth.data }); setBlog(data); }; fetching(); }, [id, setAutor, setBlog]); console.log("single blog title: ", blog.title); console.log("Autores: ", autor);