Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How about... inlining children:

    const age = 40;
    const children = [<div ~ "Moe" />, <div ~ "Larry"/>, <div ~ "Curly" />];
    return <div age ~ children />;
Rationale: single child elements are ubiquitous in web dev, but most JSX formatters will require 3 lines of code even if there's a single child.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: