Radio button lists: view or component?


Ember uses Views for Select components because of the natural collection looping inherit to Views, whereas singular elements like input[type=“text”] are typically components.

Technically both are possible. Although caveat - radio button lists require 2 components - 1 for radio-button, 2 for radio-button-list.


{{view "radio-list"

Or component:

{{#radio-list label="Component Customer Sat" value=customerSatisfaction}}
	{{radio-list-input name="custSat" label="Label High" value="high"}}
	{{radio-list-input name="custSat" label="Label Med" value="med"}}
	{{radio-list-input name="custSat" label="Label Low" value="low"}}

Or is a View a Component and the point is irrelevant?


I think Ember uses views for Selects because of legacy reasons; there was even talk about deprecating it in favor of turning it into a component not so long ago.


gahhhhh… #facepalm


Technically, a Component is a sub-class of View, but that’s only an implementation detail. It’s recommended to simply use Components instead of Views for everything and anything.


Sounds reasonable. Thanks @ulisesrmzroche