You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my React code has a fetch (inside componentDidMount for example) or other async operation (like setTimeout) that has a setState inside the callback, the snapshot does not detect that new html render, even when the snapshotDelay is very big.
The snapshot html file will not have that data on it, even tough I have a delay set up with:
"reactSnapshot": {
"snapshotDelay": 5000
}
Being the setTimeout 1000 ms, why it does not appear on snapshot? Is it not just a temporal snap of the current page html? I confirmed and the each snap waits 5 seconds on the console
I assume this is related to the issues found here: #32 #68
@arnespremberg@johnlin0207
Hi, I did not find any viable solution with the react snapshot libraries out there
My advice is: use gatsby for this kind of stuff, it's a very robust project with extensive documentation. You can balance static and dynamic react code and even trigger new "snapshots" when data changes on your API
Hi
When my React code has a fetch (inside componentDidMount for example) or other async operation (like setTimeout) that has a setState inside the callback, the snapshot does not detect that new html render, even when the snapshotDelay is very big.
A simple component example:
The snapshot html file will not have that data on it, even tough I have a delay set up with:
"reactSnapshot": {
"snapshotDelay": 5000
}
Being the setTimeout 1000 ms, why it does not appear on snapshot? Is it not just a temporal snap of the current page html? I confirmed and the each snap waits 5 seconds on the console
I assume this is related to the issues found here:
#32
#68
@geelen Can you help? Big thanks
The text was updated successfully, but these errors were encountered: