I try to init MaterializeCSS framework without jQuery in VueJS project, created with npm (vue init webpack projectname)
From version 1.0.0-rc.2 Materialize supports its own initialization without jQuery, smth like this:
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.collapsible');
var instances = M.Collapsible.init(elems, options);
});
But with this way, JS Materialize Components work only after manual page reloading and when I open some component and return to component with Materialize stuff - it doesn't work - I need to reload page manually again all the time.
So how to init JS components in proper way?