I
I
IDDH2016-05-12 18:03:41
React
IDDH, 2016-05-12 18:03:41

Using ReactJS and jScrollPane?

Good afternoon!
There is a jquery plugin jScrollPane that wraps content in its own blocks: e530ed6488d542a4ac6cf015335852d4.png
Is there any way to use jScrollPane with ReactJS so that ReactJS doesn't complain about additional blocks?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-05-12
@IDDH

As far as I can see, the following happens:
- You change the real DOM in componentDidMount using a plugin using findDOMNode or refs (You do it like that, right?)
- if something has changed in the component (props, state) - componentShouldUpdate is called, which by default it returns true, then go ahead
- get the virtual DOM from the render() method, compare it with the real DOM in the browser. There are changes - which React doesn't know about
Maybe I'll write nonsense now, but I see 3 options:
1) after each componentDidUpdate and the first componentDidMount save the DOM, replace the real one by flashing it with a plugin (it's just some kind of fierce hell, don't you think?) - then React won't see any "left" changes
2) look at the plugin and implement it yourself in the format of React components
3) find a suitable ready-made React component / plugin (very fire)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question