Frage

Please correct me if I'm wrong. The function of components in ember seems to be quite simple.

In many frameworks a "component" is probably something like a small application that manages its own status and provides a small set of APIs. Since ember uses Route to manage states of a webapp, do ember components have their own "routes" to organize its states, or do I have to implement my own solution like, a state machine?

War es hilfreich?

Lösung

Components in Ember.js are supposed to be as closely to the Web Components specification (http://w3c.github.io/webcomponents/spec/custom) as possible. If you want to handle some internal state for your component you have to implement it on your own.

Nevertheless there is no need to implement state machine on your own. Look at this https://github.com/emberjs/ember-states

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top