Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scroll tip to Building Apps docs page (gatsbyjs#14582)
## Motivation Expand the Building Apps with Gatsby page, which is very short, and save people time searching. ## Description I lost 1-2 days of my time trying to deal with dynamic routing in an integrated React app inside of Gatsby. Despite how many different combinations of @react/router, react-router, createHistory, createMemoryHistory, I could not figure out how on earth to get complex routing to work within a SPA page without gatsby scrolling to the top every time, and by trying to trick Gatsby, I couldn't get proper history working without it breaking somehow. Despite the numerous Google searches, I could NOT find a way to disable Gatsby scroll behaviour, only many issues about it *not* happening. The solution, in the end, was horrendously simple, implement `the shouldUpdateScroll` browser API. By adding this I hope I save somebody at least a few hours of their time. I thought of maybe adding it to the `<Link> / navigate()` doc page, but it's already long, and it's quite specific to SPA routing.
- Loading branch information