Closed nirvdrum closed 2 years ago
I suppose in the example all the component are in a single file to make it less intimidating for newcomers.
However, it true that I don't think that this is viable for a "real" application as otherwise, you would end up with almost your whole client app code in a single file of thousands of lines.
it suggests that all components should end up in this one file
Hi @nirvdrum, this is not the case! It is just to demonstrate how to create different components and use them from other components. Which convention you follow is up you. Personally, I prefer to put components that are logically related in one file rather then making the distinction of "big vs small" components
Thanks for the clarification. My point was that as a new user, there isn't any guidance on the matter. Whether through documentation, a code generator, linter, or something else, it'd be helpful to see how a project should be organized beyond a single file.
The 3.16.0 version of Feliz.Template creates multiple components and stores them in a single Components.fs file. Given it's the default layout provided by the new project template, it suggests that all components should end up in this one file. If that's the case, it would be helpful to call that out in the docs since it's at odds with the layout in React with JS. Alternatively, if the best practice is to split components up into multiple files, it would be helpful to have the new project template do that instead to help convey the recommended project/disk layout.