Site Javascript stops working when using history.push for another page

Asked

Viewed 20 times

0

When using the;

<a href onClick={() => history.push(`/about`)}>

Javascript stops working by locking the page slides and other objects that depend on it.

I put javascript in public/js and called them inside public/index.hmtl;

</body>
  <script src="./js/anime.min.js"></script>
  <script src="./js/timeline.js"></script>
  <script src="./js/contato.js"></script>
  <script src="./js/blog.js"></script>
  <script src="./js/main.js"></script>
  <script src="./js/slider.js"></script>
</html>

For some reason it seems that javascript stops working at the moment that makes the page transition. How can I fix this? I would have to put these files somewhere else?

  • Dear, good evening. I recommend reading the documentation on the React router and reviewing your project in React. https://reactrouter.com/web/api/Hooks

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.