javascript - Import external script into React component -
i converting template react components site. however, template in jquery. external javascripts not binding component , have bind function componentdidmount()
.
componentdidmount(){ $(".b-upper-title").slabtext({ // don't slabtext headers if viewport under 380px "viewportbreakpoint":380 }); }
however, slabtext()
not working since dependent on <script src="styles/plugins/slabtext/js/jquery.slabtext.min.js"></script>
. need import script component in order call function. idea how perform task?
try taking @ library react-async-script-loader
Comments
Post a Comment