Closed
Description
Assuming no major misunderstandings from my side: It was not clear me from the documentation that create-react-app installs fetch (whatwg-fetch), and that this is then available to me in my own JavaScript code. I only found this out when I looked at create-react-app (CRA)'s package.json file and tried it out.
I assume the presence of fetch and its use in user code is intended, but I cannot assume this is true for everything inside CRA's package.json file.
It seems to me there are three kinds of dependencies inside create-react-app:
- development dependencies, such as rimraf, which are needed for CRA's core functionality but not for any code running in the browser - the equivalent of installing with --save-development.
- dependencies that are implementation details and while they might be useful for my own code, are not guaranteed to stay in future versions of CRA.
- dependencies that I can use in my own code and that are guaranteed to stay, such as, presumably, fetch, until fetch is available natively in all major browsers.
It is hard to tell right now which dependency is which. It would be great to have this documented somewhere. I would propose something, but I lack the requisite knowledge.