Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default placeholder raise a warning #15

Closed
renodesper opened this issue Nov 29, 2018 · 2 comments
Closed

Default placeholder raise a warning #15

renodesper opened this issue Nov 29, 2018 · 2 comments
Labels
question Further information is requested

Comments

@renodesper
Copy link

Hi, it looks like the default placeholder raise a warning. Is there anything that I can do to somehow fix it?

This is the implementation that I did:

const ImagePoster = props => (
  <MovieGalleryContent placeholderSrc={props.placeholder}>
    <LazyLoadImage
      src={props.src}
      style={{ width: '100%', height: '100%' }}
      onError={e => {
        e.target.onerror = null;
        e.target.src = '/static/img/clapperboard.svg';
      }}
      delayTime="0"
    />
  </MovieGalleryContent>
);

This is the warning that I got:
Expected server HTML to contain a matching <span> in <div>.

@Aljullu
Copy link
Owner

Aljullu commented Dec 1, 2018

@renodesper thanks for raising an issue. Unfortunately I couldn't reproduce it, could you give me more details about which other packages are you using or, ideally, submit an example repo to GitHub or somewhere else so I can download it and reproduce the issue?

In addition to that, if I'm not missing anything, placeholderSrc prop should be set to <LazyLoadImage> instead of <MovieGalleryContent>.

@Aljullu Aljullu added the question Further information is requested label Dec 1, 2018
@renodesper
Copy link
Author

Hi, sorry for the late reply. Unfortunately, we ended up using another library since we need to finish it fast and also need SSR functionality. I will just close the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants