Re:Ask HN: How can we make React better?
by dylanhassinger on Monday October 08, 2018 @08:40PM
(#18172480)
be more like Vue
[ Parent
| on HN ]
Re:Ask HN: How can we make React better?
by sophiebits on Monday October 08, 2018 @08:46PM
(#18172512)
Anything in particular you think Vue does better? We'd love to improve.
Re:Ask HN: How can we make React better?
by palmdeezy on Monday October 08, 2018 @10:02PM
(#18172808)
Styles.
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.
Re:Ask HN: How can we make React better?
by acdanger on Monday October 08, 2018 @10:12PM
(#18172847)
I 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.
Re:Ask HN: How can we make React better?
by tenaciousDaniel on Monday October 08, 2018 @10:13PM
(#18172851)
I 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...
Re:Ask HN: How can we make React better?
by sophiebits on Monday October 08, 2018 @10:15PM
(#18172861)
God, this is one of my pet peeve issues. I swear we'll fix it someday.
Re:Ask HN: How can we make React better?
by tenaciousDaniel on Monday October 08, 2018 @10:19PM
(#18172876)
Ha! Glad that it's known, at least.