4 ms·
>But to say that "the only way" to do anything on the web is the height of hubris, and closed-mindedness. How will you know when the next great thing comes alon
by aphextron 8y ago
>But to say that "the only way" to do anything on the web is the height of hubris, and closed-mindedness. How will you know when the next great thing comes along, if you've already committed yourself to an "only way?"
It's not the only way to do web development. But it's the only way to structure UI for an application. It's the pattern native developers have settled upon and used for decades. That's why it's been so frustrating for me waiting to see this paradigm come to web development. It's what iOS/Android/MacOS developers have enjoyed for years.
The tooling is finally mature now, and it's actually fun to develop for the web these days. But before the modern React/Babel/Webpack development environment, it was really tough to build large scale maintainable SPAs without massive expertise. There were things like GWT, Closure, Backbone, etc. But the sort of "batteries included" UI frameworks and IDEs that developers enjoyed in native development was nonexistent on the web until recently.
- purple_ducks 8y ago> it's the only way to structure UI for an application No, it's not. Want consistency in all your text boxes/links/buttons? Are you going to copy/paste or inherit from a base button component or define the general common styles in one place and have the browser automatically apply them with 0 thought. Need a button to be different - then do inline styles or more specific selector(incl. CSS in JS) or use !important. As parent poster said, definitively stating there is only one true™ way to do something is the height of hubris. > That's why it's been so frustrating for me waiting to see this paradigm come to web development Inline styles were the norm for quite a long period of time...
- mosdl 8y agoIn fact inline styles came first!
- tracker1 8y agoHere's roughly how I do it[1] ... import Button from '@material-ui/core/Button'; export MyComponent = ({actions}) => ( <Button variant="outlined" color="primary" onClick={actions.save} > Save </Button> ); [1] https://material-ui.com/demos/buttons/ https://material-ui.com/demos/buttons/