I have asked myself this question a number of times. What is the best possible way to structure my UI code? Should I cluster the files using functionality or by the type of file? etc. etc.
I found a partial answer in Fractal Folders while learning ReactJS. This basically proposes that for an UI page there are many functionalities which it is comprised of and the artefacts related to these sub-functionality should be clustered as sub-folders.