Some JQuery plugins don\'t just add behavior to DOM nodes, but change them. For example, Bootstrap Switch turns
In this great ryanflorence's tutorial you'll get an idea on how to do this:
Wrapping DOM Libs
Methodology
- DOM libs usually manipulate the DOM
- React tries to re-render and finds a different DOM than it had last time and freaks out
- We hide the DOM manipulation from React by breaking the rendering tree and then reconnecting around the DOM the lib manipulates.
- Consumers of our component can stay in React-land.