Hacker News new | ask | show | jobs
by insin 4047 days ago
That's not been my experience - multiple lines nest quite nicely - but even when directly inlining isn't suitable (e.g. multiple if/else checks or rendering a list in a way which doesn't suit a straight .map()) I prefer creating another method and inlining the call to it, e.g. from my Hacker News API clone:

    <ol className="Items__list" start={page.startIndex + 1}>
      {this.renderItems(page.startIndex, page.endIndex)}
    </ol>