Re:React v16.2.0: Improved Support for Fragments
by danabramov on Tuesday November 28, 2017 @07:38PM
(#15803446)
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 better. I understand some people will always disagree though, and that's fine :-)
Re:React v16.2.0: Improved Support for Fragments
by electric_sheep on Wednesday November 29, 2017 @07:35AM
(#15806287)
Yeah, it seems like the decision to make the fragment a first-class JSX concept has a lot to do with portability between renderers. The post makes it clear you all have given this a lot of thought and care, and I appreciate that (even if it will take me awhile to get used to seeing empty tags, haha).
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?