I am able use fetch api newly created reactjs app. But I am using this template and it says cant find fetch api.
whats wrong here? I encounter smilar issues how can I fix it?
If you are using Typescript 2.8.0+ fetch is included in the standard lib.
You will need to use "--lib dom" or add "dom" in your tsconfig.json:
{
"compilerOptions": {
"lib": ["dom"],
}
}
{
"compilerOptions": {
"lib": ["DOM"],
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With