render-runtime
render-runtime copied to clipboard
Fix external page navigation
What does this PR do? *
It fixes a problem when navigating to a page not served by render with the navigate function.
It also removes a lot of old code.
How to test it? *
Reproducing the current error
- Go to https://storetheme.vtex.com/
- Open chrome devtools
- Go to the Components tab, from React Developer Tools
- Click on the
ncomponent in the tree (it is the RenderProvider) - Run
$r.navigate({to: '/checkout'})in the console and you will se the error

Now reproduce the steps in https://navigation--storecomponents.myvtex.com where this branch is linked. It works fine
Describe alternatives you've considered, if any. *
Related to / Depends on *
Beep boop :robot:
I noticed you didn't make any changes at the docs/ folder
- [x] There's nothing new to document :thinking:
- [ ] I'll do it later :disappointed:
In order to keep track, I'll create an issue if you decide now is not a good time
- [ ] I just updated :tada::tada:
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖
Please select which version do you want to release:
-
[x] Patch (backwards-compatible bug fixes)
-
[ ] Minor (backwards-compatible functionality)
-
[ ] Major (incompatible API changes)
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
- [ ] No thanks, I would rather do it manually 😞