Console Error when an Inertia link is clicked: Uncaught DOMException: Failed to execute 'replaceState' on 'History' #1652
Unanswered
connecteev
asked this question in
Help (Vue)
Replies: 1 comment
-
I got the same problem. How to fix this? [EDIT] Found a way to solve it: Just make a "correct" clone of your previous pagination data since Vue wrappes it into a proxy.
instead of
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following repo from codecourse.com implements infinite scroll using inertia:
https://github.com/codecourse/inertia-infinite-scroll
I started with this repo and was able to get this running: so far so good.
However, when I modify the Index.vue file like so:
(here, I wrapped the contents of the old Index.vue file inside
<BlankLayout>
tags)where resources/js/Layouts/BlankLayout.vue contains:
routes/web.php:
DummyPostIndexController.php:
Now, when I load the
/test/infinite_scroll
URL and click on the "Test page" button, the link works fine.If I then scroll down some (to trigger the infinite scroll logic), and then click on the "Test Page" button, the link does not work, and the following error is seen in the console:
I understand that directly modifying the props is a vue.js component is an anti-pattern, but that is what the original code seems to be doing here: https://github.com/codecourse/inertia-infinite-scroll/blob/main/resources/js/Pages/Posts/Index.vue#L19C9-L19C9
What is the proper way to fix this?
Beta Was this translation helpful? Give feedback.
All reactions