reactjs - Best practice for organizing hundreds of components? -


when have big application have hundreds components, of heavily shared others, , of layout or simple view. there advises organizing components? module? or usage? or other policies?

i create directory per page, stick 1 component per file (ie addbutton in add_button.js.jsx). have top-level component page suffixed app.

  • user
    • user_list.js.jsx
    • user_app.js.jsx
  • dashboard
    • dashboard_app.js.jsx
    • histogram.js.jsx
  • analytics
  • shared
    • buttons
      • add_button.js.jsx
      • reset_button.js.jsx
    • list.js.jsx
    • table.js.jsx

this has become default go-to approach while now, curious see how others proceed.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -