I'm using react-native and standardjs.
Standard reports that both fetch
and FormData
are undefined when I use them, which is true. However, I can't figure out where either of these symbols are defined. I can't seem to import them from either react or react-native modules.
What import statement should I use to import fetch
and FormData
?
fetch and FormData are provided as global polyfill for react-native. https://facebook.github.io/react-native/docs/network.html#content
Something like this to your package.json will prevent standardjs complaining about undefined variables
{
"standard": {
"globals": [ "fetch", "FormData" ]
}
}
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