JavaScript LoremPixel component always renders same image

This is a LoremPixel component that I built:

export default function LoremPixel({ url = 'http://lorempixel.com', width = 200, height = 400, alt = 'Placeholder image' }) {
  const src = `${url}/${width}/${height}`;
  return (<img className={centerImage} src={src} alt={alt} />);
}

const { string, number, oneOf } = PropTypes;

LoremPixel.propTypes = {
  url: string,
  height: oneOf(string, number),
  width: oneOf(string, number),
  alt: string,
};

I am supposed to get a randomized image of width 200 and height 400 every single time but instead I always see the same image in all my LoremPixel components.

Cute puppy lorempixel repeated image

I call it in my component like:

  return (
    <Card containerStyle={containerStyle}>
      <CardHeader
        title={title}
        style={headerRootStyle}
        textStyle={cardHeaderTextStyle}
        titleStyle={titleStyle}
      />
      <span className={authorStyle}>{author}</span>
      <CardMedia>
        <LoremPixel width={200} height={100} />
      </CardMedia>
      <CardText style={textStyle}>
        <LoremIpsum />
      </CardText>
      <CardActions style={actionsStyle}>
        <FlatButton label="Buy Now" />
      </CardActions>
    </Card>
  );

from the Book component which is called in a Bookshelf component:

Books = books.map(book => (<div
  key={uuid.v4()}
  className={colFixedWidth}
  {...firstChild}
  {...secondChild}
>
  <Book {...book} />
</div>),
);
Answer:1

I'm trying to parse the following data: data = [ {"id":"orderBy", "options" : [ {"value":"order-by=newest&", "name":"newest"}, {"value":"order-by=relevance&", "name":"...

I'm trying to parse the following data: data = [ {"id":"orderBy", "options" : [ {"value":"order-by=newest&", "name":"newest"}, {"value":"order-by=relevance&", "name":"...

  1. accessing structure data in matlab
  2. accessing structure data

So I'm trying to create a program that iterates through 2D array until it finds a matching ticket; however when the program finds the number within the array it doesn't break: var namesArray = [...

So I'm trying to create a program that iterates through 2D array until it finds a matching ticket; however when the program finds the number within the array it doesn't break: var namesArray = [...

  1. legal issues with breaking a lease

Consider the following code: angular.module('app', ['app.core']) .factory('NameService', function() { return { getName: function() { return 'Omar' ;} }; })...

Consider the following code: angular.module('app', ['app.core']) .factory('NameService', function() { return { getName: function() { return 'Omar' ;} }; })...

When using Chartjs with Polymer with setting as dom: 'shadow', I am getting an error as Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element But ...

When using Chartjs with Polymer with setting as dom: 'shadow', I am getting an error as Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element But ...