3 ms·
There's a lot to be said for separating concerns and it's still good practice within your component. No-one is really disputing it afaik, but the way we are/wer
by scarlac 10y ago
There's a lot to be said for separating concerns and it's still good practice within your component. No-one is really disputing it afaik, but the way we are/were creating web pages are based on a document-centric paradigm.
Single Page Apps (SPAs) are more app-like than webpage-like and if you're really going for reusability then your components need to have a say in how they are rendered. That means they need to provide /some/ HTML.
You can still create components without including CSS but you'll likely need to provide structure (HTML) in order to bind behavior/callbacks/events to it. It's still good practice to separate rendering (HTML/JSX/NG) and behavior.