react-hn icon indicating copy to clipboard operation
react-hn copied to clipboard

getTitle not clearly specified

Open t3h2mas opened this issue 9 years ago • 0 comments

getTitle from js/NewsItem.js isn't clearly specified in the note above the NewsItem subtext section. Currently someone would have to either move the rendered code up to the getTitle method before going through the section, or they would have to scroll back through 2 previous sections to piece together the code. I think it could be done more clearly by including the whole method code in the NewsItem subtext section

  getTitle: function () {
    return (
      <div className="newsItem-title">
        <a className="newsItem-titleLink" href={this.props.item.url}>{this.props.item.title}</a>
        <span className="newsItem-domain">
          ({this.getDomain()})
        </span>
      </div>
    );
  },

t3h2mas avatar May 04 '16 05:05 t3h2mas