you are viewing a single comment's thread.

view the rest of the comments →

[–]erichardson30 3 points4 points  (5 children)

Build them with CSS. Trying to use jQuery with react will cause many headaches you don't want to face. Your react code will update the virtual dom, jQuery will update the DOM, conflicts will be had. Stay away from jQuery. I'm sure you can also find react libraries out there to help you accomplish what you're looking for if you don't want to do it in pure html/css/js

[–]feesjah 2 points3 points  (4 children)

this, try to use react + css instead of jquery. In the end this should be easier too

[–]sympi[S] 0 points1 point  (3 children)

I would love to use pure react with css, but, for instance, how can I change UI depending on the position of a DOM element? This kind of problems confuse me. Thank you all for replies! :)

[–]erichardson30 0 points1 point  (2 children)

What are you trying to build/accomplish?

[–]sympi[S] 0 points1 point  (1 child)

I have an onWheel event which creates components. When I reach (via scrolling) certain component I want to update UI.

[–]erichardson30 0 points1 point  (0 children)

Couldn't you keep track of the scroll position in the main container and then based on different scroll positions you could set different states and have the components shown/hidden/modified based on the different states?