官术网_书友最值得收藏!

Creating a new React project from scratch

There's a standard template for creating React apps: the create-react-app application template. This includes some standard dependencies and boilerplate code that all React applications need. However, it also contains some extra items such as favicon.ico, a sample logo, and CSS files. While these are undoubtedly useful, having them here at the very start of a project is at odds with one of the test-driven developer's core principles: You Ain't Gonna Need It (YAGNI).

This principle says that you should hold off adding anything to your project until you're really sure that it's necessary. Perhaps that's when your team adds a user story for it into the iteration, or maybe it's when a customer asks for it. Until then, YAGNI.

It's a theme that runs throughout this book and we'll start right now by choosing to avoid create-react-app. You can always start every JavaScript project from scratch, and there's a certain joy to be found in going over the basics each time.

主站蜘蛛池模板: 清新县| 屏边| 崇义县| 南江县| 铜梁县| 平和县| 开化县| 永清县| 巴塘县| 抚远县| 平凉市| 山东省| 东乡县| 武强县| 景洪市| 彭泽县| 托里县| 运城市| 福贡县| 河津市| 黑水县| 屯留县| 冷水江市| 河曲县| 灌云县| 古蔺县| 凤冈县| 东乡族自治县| 钟山县| 留坝县| 红桥区| 怀远县| 阳谷县| 上思县| 渭源县| 泰和县| 宿迁市| 如东县| 仁布县| 聊城市| 沁水县|