Ive started with React recently and strangely the lack of fragments were one of the things that caught my attention in the first days. Another thing I'm looking for in React as I get started is better styling support. I'm resourcing to React JSS for that, but I feel it should be part of the language. The web trinity if you may is HTML-CSS-JS and React basically left CSS out half-baked into almost unusable style attri…
React v16.2.0: Improved Support for Fragments
31–40 of 47 posts
Re: React v16.2.0: Improved Support for Fragments
#32Ive started with React recently and strangely the lack of fragments were one of the things that caught my attention in the first days. Another thing I'm looking for in React as I get started is better styling support. I'm resourcing to React JSS for that, but I feel it should be part of the language. The web trinity if you may is HTML-CSS-JS and React basically left CSS out half-baked into almost unusable style attri…
It has out of the box support in Atom and scss (like?) syntax.
Re: React v16.2.0: Improved Support for Fragments
#33Ive started with React recently and strangely the lack of fragments were one of the things that caught my attention in the first days. Another thing I'm looking for in React as I get started is better styling support. I'm resourcing to React JSS for that, but I feel it should be part of the language. The web trinity if you may is HTML-CSS-JS and React basically left CSS out half-baked into almost unusable style attri…
Re: React v16.2.0: Improved Support for Fragments
#34Earlier quoted context omitted.
Fibers? I thought they were implemented and that was what React 16 was all about.
From React 16 blog post ( https://reactjs.org/blog/2017/09/26/react-v16.0.html ): >We think async rendering is a big deal, and represents the future of React. To make migration to v16.0 as smooth as possible, we’re not enabling any async features yet , but we’re excited to start rolling them out in the coming months. Stay tuned! The rewrite was about adding the foundation for making this even possible . But there's s…
Re: React v16.2.0: Improved Support for Fragments
#35I just can't help but sneer. Opinionated document.write() using "jsx". Working with react has been the worst experience of my life. I had to call a meeting and laid in down in October. If 2018 is React, I am leaving on Dec 31. So soon I am going swiftly back into the arms of Angular and I can't wait. Honestly, my eyes are blurring as I type this with pure happiness. Enjoy the fragments guys, it will be good practice…
Re: React v16.2.0: Improved Support for Fragments
#36I just can't help but sneer. Opinionated document.write() using "jsx". Working with react has been the worst experience of my life. I had to call a meeting and laid in down in October. If 2018 is React, I am leaving on Dec 31. So soon I am going swiftly back into the arms of Angular and I can't wait. Honestly, my eyes are blurring as I type this with pure happiness. Enjoy the fragments guys, it will be good practice…
Next time post this kind of stuff on your blog, not HN comments.
Re: React v16.2.0: Improved Support for Fragments
#371: Like this:
... Re: React v16.2.0: Improved Support for Fragments
#38Earlier quoted context omitted.
Sure, we can call it syntax. Of course, for anyone who already knows what it does, it's just a transform, but the problem with extra syntax is that it makes it harder for newcomers to pick it up. Taking your example when putting it in front of someone seeing it for the first time: In: Out (Newcomer): WTF does that mean? Did someone forget to put something in those tags?
Same newcomer, in a couple of weeks: "Don't know how I lived without it". I understand your point, but in practice people love tiny affordances like this, especially when they are needed as often as fragments are. This is a balance, but it's important to consider the needs of power users too. Beginners don't stay beginners forever. We've thought about this for a few months, and decided that adding syntax would be bet…
Re: React v16.2.0: Improved Support for Fragments
#39Earlier quoted context omitted.
> The Fragment syntax adds some additional magic to JSX (which is rarely a good thing) In: Out: WITCHCRAFT!! SORCERY!! Teasing aside, I don't get what's magical about this. It's a straightforward transform. You can call that "magic," I'll call it "syntax."
Sure it's straightforward enough and much better than what we had before. But for a newcomer to JSX it looks odd. I'm probably just missing the reason for the syntax, we're already compiling - why can't fragments be added automatically as required?