4 ms·
Consider a list. If you only had server-side rendering, you would define a function that iterates through the list and outputs list items. If the list is to be
by firasd 11y ago
Consider a list. If you only had server-side rendering, you would define a function that iterates through the list and outputs list items. If the list is to be changed when you reload the page, you'd use the same function to render the list, just modifying the variable that contains the list items.
Now in React, you define a component that renders the list. If the list is to be changed, you modify the variable that contains the list items. That same component renders the list again.
If you were using jQuery to change a list it's a whole different story: you'd have some variables that represent the latest state of the list (or the item to change, etc.) but then you have to select and manipulate the list items in the DOM.
So in that way React & server-side rendering are very similar.