I am working with Reactjs(Nextjs),I am trying to integrate home page(index.js),i have following javascript files and code,i want to know that where should put these file(exist in "public" folder) ? and how ? i mean should i use these files in "_app.js" or create separate file "document.js" for this, What is the right way ?
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/isotope.pkgd.js"></script>
<script>
$(window).load(function() {
var $projects = $('.projects').isotope({
itemSelector: '.project',
layoutMode: 'fitRows'
});
$(".filter-btn").click(function() {
var data_filter = $(this).attr("data-filter");
$projects.isotope({
filter: data_filter
});
$(".filter-btn").removeClass("active");
$(".filter-btn").removeClass("shadow");
$(this).addClass("active");
$(this).addClass("shadow");
return false;
});
});
</script>
<script src="assets/js/templatemo.js"></script>
<script src="assets/js/custom.js"></script>
rootreact element, somewhere where they will not come in contact with react at all. So don't just place them outside of react and then call them within react. React and jquery should have no contact with each other (there are some niche exceptions, but I don't think those exceptions are relevant in this case).