Skip to content

Conversation

@almostneil
Copy link

No description provided.


var starMarkup = '';
for (var i = 0, j = props.product.rating; i < j; i++) {
starMarkup += '★';
Copy link
Contributor

@jw56578 jw56578 Jan 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make note of what markup actually made the star images show up. jsx allows you to manipulate html elements as javascript also. so you could have done something like
myarray.push(<span/>)

import React from "react";
import ProductDetail from './ProductDetail';

function ProductGrid(props){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job organizing things into another component. This probably makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants