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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -