Here I tried to extract and set the texts in one state, but I'm not able to console the text
const [text, setText] = useState('')
useEffect(() => {
fetch('Docs/Introduction.pdf').then(res=>{
let texts = res.text()
setText(texts)
})
}, [])
**console.log(text);**
But in console, I'm getting,
Here I need to get the all texts in texts state