I have used JQuery inside my React functional component to select nodes that have a specific tag + class, just like in CSS, but can I do something similar with React besides the Javascript classic way? For example, if I have an unordered list who has an element with the class "active", I can remove his class like so with JQuery:
$("ul li.active").removeClass("active");
With what I have found by now, with React something similar would be:
let element = document.getElementByClassName("active")
ReactDOM.findDOMNode(element).classList.remove("active");
Obviously the two methods are not equivalent, because in the JQuery one I also specified I want the node to be a li with class active who is a child of ul, so I would probably need to write 2 more lines for it to match the JQuery command.
Is it a shorter or better way of doing this, and also is it OK to use JQuery inside React?