While there have been many answers to this here, it does not seem to be working yet.
- Jquery in React is not defined
- https://scriptverse.academy/tutorials/reactjs-using-jquery-with-react.html
I'm trying to use the plugin 'jq-timeline' in my project. I tried to do that:
import $ from 'jquery';
import timelines from 'jq-timeline/dist/jquery.timeline'
But I'm still getting an error
ReferenceError: $ is not defined
Edit: If I remove the plugin import, and print $, I see that it exists.
Edit2:
Slove it with:
import $ from 'jquery'
window.$ = $;
const timeline = require('jq-timeline')
What do I need to do to view the timeline?