Closed kuongknight closed 6 years ago
Can you provide more clear description of the issue and reproducible example?
Try add componentWillMount() { window.scrollTo(0, 0) }
to App.js and build (create-react-app)
If you are reporting about not implemented scrollTo
. Yes this is known issue, because react-snapshot
using jsdom
which implements only subset of browser APIs. You can file an issue against jsdom
as well.
From readme:
Is JSDOM gonna hold us back at some point?
We should make possible config beforeParse
for jsdom.
Jsdom issue won't be fixed, see https://github.com/geelen/react-snapshot/pull/44#issuecomment-341292537. If this answers your question please close issue. Thanks
I found error "Error: Not implemented: window.scrollTo", I fixed it by custom react-snapshot Then it is working, but react-snapshot render same with all page (without react render, only html with script tags)