Don’t want this to be purely negative though. I am a huge fan of cra overall and it has helped me immensely with setting up new projects and prototyping. Just hope the core simplicity will stay.
Don’t want this to be purely negative though. I am a huge fan of cra overall and it has helped me immensely with setting up new projects and prototyping. Just hope the core simplicity will stay.
- `index.js` is required as the entry point for the app
- `App.js` is the main app component
- `App.test.js` shows you can write a test for a component
- `App.css` shows you can import CSS files directly into the JS to have it included in the output
You can begin editing those files, or just delete all but `index.js` and start writing your own.
Many folks who have used CRA will just immediately delete those. Beyond that, some folks have forked the `react-scripts` package just to set up a different project source template.
Adding an option to specify a template means that other folks can now publish their own CRA-compatible project source templates and have them work with CRA right away. For example, I'm a Redux maintainer, and we could create a CRA template that already has a dependency on Redux (or our new Redux Toolkit package), all set up and ready to go without the user having to manually install them.
The different package tools mentioned in the release notes serve different purposes. `npm` and `yarn` are competing JS package managers. They both install and update packages from the NPM registry, with some different features available. `npx` comes with the `npm` tool, and is a way to quickly run CLI packages like `create-react-app` without having to explicitly run a separate "install this globally" command first.
And yes, RTK is intended to be useful for both new and experienced Redux users [0], and we're now recommending it as the default standard way to write Redux logic [1].
See the RTK v1.0.4 release notes [2] for the details on the name change.
[0] https://redux-toolkit.js.org/introduction/quick-start
[1] https://redux.js.org/style-guide/style-guide#use-redux-toolk...
[2] https://github.com/reduxjs/redux-toolkit/releases/tag/v1.0.4
I’m about 18 months out from last using it, but people were saying this then and it was, in fact, full of bugs and missing features. The company I was at kept starting projects with it because it was trendy, then switching to NPM when we tried to use a feature yarn didn’t have or lost an hour debugging some problem that turned out to be yarn-induced breakage. This was the consistent experience of about a dozen developers across several projects, most of whom were very enthusiastic about yarn, at first.
Maybe it’s much better now but, again, people have been saying this since it first came out and if it’s true, it’s a recent development.
- Messing up certain cases of dependency resolution such that you'd get a different version than NPM would give you.
- Something involving not checking paths they should have been, that caused brokenness.
- Local package problems of several sorts—really any 1%-of-users-or-lower use case, and I'd guess "just fetch some packages from the NPM servers" is the sole use case over 1%, seemed fairly likely to have problems.
- All of the above and more sometimes causing a dependency that worked under npm to fail with misleading error messages due to bad interactions between that package and yarn.
There were more but I don't remember all of them. My impression was that they implemented half the features of npm, did way fewer correctness and safety checks, crowed about how fast they were, and everyone crowned it as a superior drop-in replacement for npm literally years before that would be justified.
Mind I have no love for npm and don't much care what the command I run is called or who made it, I just repeatedly saw projects start on yarn then hit a silly problem the simplest fix for which was "use npm", while people were running around shit-talking npm and acting like yarn was some kind of miracle.
[EDIT] our projects were node, React, and React Native. I'd definitely believe it's possible use Yarn and never hit this if you don't happen to use a package that's broken in it and has only been tested under npm, or happen to step on one of the landmines, and maybe it actually is totally fine now, I just know people were claiming it already was and sticking their fingers in their ears when you told them otherwise back when it absolutely was not a suitable npm replacement yet.
NPM can mess up it's own dependencies, or give you different dependencies on different machines. It's algorithm is (was?) non-deterministic.
> - Local package problems of several sorts
I use yarn with lerna to keep a monorepo of local packages together, it works pretty well. At the time, npm didn't.
> - All of the above and more sometimes causing a dependency that worked under npm to fail with misleading error messages due to bad interactions between that package and yarn.
Never ran into anything like this. Show me a package that doesn't work with yarn
Yarn gave npm some much needed competition and made npm improve a bit. Before yarn, npm didn't even have lockfiles. Having both is good, but I've just had less issues with yarn overall.
Been too long, don't remember. Happened more than once. Options were "debug package under yarn, and assuming there's a way to fix it without modifying yarn itself, submit PR to package's repo" or "just use npm".
Naïve search for 'is:issue is:open "npm works"' over yarn's ~2,000 open issues reveals some packages that don't work with it, pretty quickly. I'm sure npm has bugs too but we consistently and reliably ran into yarn problems that could be fixed immediately by switching to npm, on several projects. A browse through their issues more generally reveal tons and tons of broken features and edge cases, still, looks like, which is how it was back when I was using it, too.
If it's working for folks that's fine, but I think it's still a bad idea to give (especially) newbies the impression yarn's clearly the best choice.