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

Set delay before taking screenshot? #11

Open
dylanjt opened this issue Aug 2, 2018 · 2 comments
Open

Set delay before taking screenshot? #11

dylanjt opened this issue Aug 2, 2018 · 2 comments

Comments

@dylanjt
Copy link

dylanjt commented Aug 2, 2018

I'm working with a legacy component (that is itself a legacy D3 chart shoved into a React component and hacked together using refs). I'm unable to use component-image on it because the initial element is added to the DOM in the first run of render, but is not actually populated with a graph until componentDidMount runs. Therefore, I'm getting a blank screenshot.

Before I just bite the bullet and rewrite this crap (referring to my component), is there any way to set a small delay?

@kbrenneman-athn
Copy link

I would also like this feature, to wait for component did mount

@corygibbons
Copy link
Owner

A delay won’t help unfortunately because component-image is using renderToStaticMarkup to render the component. It’s server rendered so componentDidMount won’t actually fire at all.

I’m interested in trying to implement something to make this work but don’t know when that would be, and I’m quite busy at the moment unfortunately.

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

3 participants