4 ms·
React is a UI framework where the view is a direct representation of the application state. A (react) component is a function (or class) that returns a UI eleme
by graftak 5y ago
React is a UI framework where the view is a direct representation of the application state. A (react) component is a function (or class) that returns a UI element based on the props (state) it receives.
With React; component + props = view, this makes it easy to reason about what your UI looks like because it is a result of how you manipulate your data.
With jQuery that is more like: view = html + a bunch of (spaghetti) code. This can make it harder to reason about because you need to implement the logic to update your view and event handlers yourself.