4 ms·
be more like Vue
by dylanhassinger 8y ago
be more like Vue
- sophiebits 8y agoAnything in particular you think Vue does better? We'd love to improve.
- palmdeezy 8y agoStyles. I know Facebook has an internal CSS Module thing that is not open source ready. So this has been pushed off to user land. However, lack of an officially blessed style solution makes React components less reusable across projects compared to Vue. Thanks to vue-loader, the Vue community can focus on other things. I am NOT advocating for single file components like Vue, I am hoping that FB can just bless a solution so we can move forward as community.
- acdanger 8y agoI agree styles are an afterthought in React. I'm starting to grow fond of Styled Components, but even then I still find doing more advanced CSS operations a bit of a pain. Things like global styles, media-queries, pseudo-selectors and nested selectors sometimes require a pretty good understanding of the library's API and almost always require a trip to the documentation. I'm really quite pleased Vue sort applied the component approach to styles by slapping them in the component file and then left it at that.
- deleted 8y ago[deleted]
- tenaciousDaniel 8y agoI actually found a bug last week with React's styling logic. I haven't submitted a bug report yet because, well, I'm lazy. But if OP reads this comment, I outlined it here: https://stackoverflow.com/questions/52636618/modifying-react-style-object-seems-to-corrupt-dom-styles/52636689 https://stackoverflow.com/questions/52636618/modifying-react...
- sophiebits 8y agoGod, this is one of my pet peeve issues. I swear we'll fix it someday. https://github.com/facebook/react/issues/6348 https://github.com/facebook/react/issues/6348
- tenaciousDaniel 8y agoHa! Glad that it's known, at least.
- toufique 8y agoI do love Vue's single file components for small components. It's a big productivity boost to be able to reason about the different facets of a component together.
- toufique 8y agoI recognize that it's a very different philosophy, but first-class support for interpolated HTML made porting existing applications very easy in Vue.