我可以将 ReactJs Wether 项目的图像放在哪里?组织文件夹的最佳方式是什么?

问题描述 投票:0回答:1

enter image description here

您好,我目前正在使用 React 开发一个天气应用程序的学校项目。到目前为止,我只从事过小型项目,因此我对文件夹结构以及在何处组织内容以进行最佳排序不太有经验。如果有人能给我一些建议,我将不胜感激。

我不确定我应该在这里写什么。

reactjs directory-structure
1个回答
0
投票

这主要取决于个人对如何构建应用程序/网站的偏好。

我喜欢将大多数组件放在不同的子文件夹中以保持概览。

CSS<-- I just like to separate the Css for specific components, everything footer in a file everything header in a file. etc

JS<-- Just all the Script files I need for different components / data entry. (Naming files is the most important to keep it neat. its easyer to find something called FinancialRuin.js then have to search through all small just quick named files for easyness. fr.js or other abbreviations.)

媒体,<-- media folders the more media you add the harder it will become to find what you need. so you can index media in subfolders dedicated for that specific need.

但我认为这确实取决于个人。

我希望这对我在制作和构建东西时本身就是混乱的有所帮助:)

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.