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

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.

主站蜘蛛池模板: 杭锦后旗| 石景山区| 呼和浩特市| 体育| 上犹县| 泸水县| 通榆县| 长春市| 高邮市| 三门县| 长垣县| 济南市| 普陀区| 东宁县| 承德县| 三河市| 行唐县| 四会市| 安徽省| 和硕县| 绵竹市| 永定县| 张掖市| 永春县| 工布江达县| 东明县| 凌源市| 南澳县| 华池县| 南宁市| 西丰县| 龙游县| 棋牌| 蕉岭县| 大足县| 浦县| 黔江区| 蓝田县| 洛南县| 星座| 五原县|