Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4834

Best practices for Component Folder structure?

$
0
0

@SarathSantoshDamaraj wrote:

I am new to ember and from react background. Categorising components in react is flexible, want to know how the same is done in ember.

Considering the following types of components that present in every app

Stateful/Stateless Components - UI components like Buttons 
Container/Presentational Components - Like App container, Body container
Higher Order Components - Parent of every page/route 
Contextual Components - Specific to pages

Currently I have categorised the components into 3 types:

  1. Containers - A container component that has nested divs that are used across multiple places in app. Instead of using those nested every-time, they are constructed as a component and the children are yielded here.
  2. Pages - All the child elements of every route/page will be here and this component will be rendered in specific route template.hbs.
  3. Ui-elements - All the Elements/Components in the app, which are not specific to page, and that may-or-may not be reusable.

Is it a good approach, How does complex applications architecture their app?

Thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4834

Trending Articles