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

children is rendered 2 times on successful loading of image. Why? #25

Open
efleurine opened this issue Jul 8, 2018 · 1 comment
Open

Comments

@efleurine
Copy link

In the code there are two references to children props where it is rendrerd. The first one here

(this.state.isLoaded && !this.state.isError) ? children :
and the second one here
this.props.children

If I close my network so the network image is inaccessible then only the second one will be rendered. But with a successful loading both will rendered.

I could not figure out why ?

Do we really need that?

thanks for helping me understand.

@sjonchhe
Copy link

You can fix it by removing from line 69 to 76
{
this.props.children &&

{
this.props.children
}

}

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

No branches or pull requests

2 participants