R
R
Ramil2017-09-18 14:54:29
JavaScript
Ramil, 2017-09-18 14:54:29

How to access jquery plugin from React component?

I connect to the page first jquery plugin and then reactjs. Then I try to access the plugin from the componentDidUpdate function. But for some reason it can't find the plugin function. Although through the console in the browser everything works fine. And jquery itself is normally visible inside the component.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Archakov Dennis, 2017-09-18
@vafarulez

windows.myplugin = $.myplugin;
window.myplugin();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question