Calling javascript function in meteor react

Hi,

i’m working on the boostrap offcanvas menu (https://getbootstrap.com/examples/offcanvas/)

i have a problem to call a javascript function. i dont know where to put it or how to translate it into react…

the function is like this

$(document).ready(function () {
    $('[data-toggle="offcanvas"]').click(function () {
        $('.row-offcanvas').toggleClass('active')
    });
});/**

thanks

You’ll want to look into using the componentDidMount lifecycle method. Take a look at the jQuery + Bootstrap demo in the React repo.