Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

React not playing well with JQuery or others seems like it makes React something of an all or nothing proposition.

Otherwise, it seems like an interesting approach.



This is false. Although it's true that React makes the most sense when each individual component is all React, it's easy to embed small React components into a non-React application, and you can also wrap small jQuery plugins (like select2, for instance) in React without too much work.

At Khan Academy we've decided to move to React for new JS development but we've had a lot of success moving to it incrementally and building new pieces in React without having to touch the old ones.


You can have jQuery above react - to trigger state change in react's component tree (and DOM rerender). In the same way you can call out jQuery functions that would affect DOM that's not controlled by React. For manipulating the react-controlled DOM it does not make much sense to use jQuery anyway because react's mechanism are better and come with welcome side-effects (like rerendering to browser DOM only when it is necessary).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: