--- { title: "What are React Server Components?", description: "", published: '2023-12-14T21:52:59.284Z', authors: ['crutchcorn'], tags: ['react', 'webdev'], attached: [], license: 'cc-by-4', collection: "React Beyond the Render", order: 1 } --- # What is Reactivity? > This article is intended for newcomers to HTML and JavaScript programming. However, it's suggested that you read [this article explaining what the DOM is](/posts/understanding-the-dom) first. As an experienced frontend engineer, I'm often asked: > "Why would you want to use a modern frontend framework like React, Angular, or Vue?" While [I have a whole (free) book on the topic](https://framework.guide), my short answer is typically "Reactivity". The follow-up response I usually get from this is: > "What is reactivity?" In short, **Reactivity is the ability to reflect what's in your JavaScript application's memory on the DOM as HTML**. See, when you're building a website using only static HTML, the output to the DOM is straightforward. ```html

Text here

``` ![// TODO: Write alt](../understanding-the-dom/dom_tree.svg) The problems start when we want to introduce interactivity into our output. Let's build a small-scale application that: - Has a button with a counter inside of it - Start the counter at `0` - Every time the button is clicked, add one to the counter ![// TODO: Write alt](./step_1.svg) To do this, let's start with some HTML: ```html
``` Then we can add in the required JavaScript to make the button functional: ```html ``` ## Adding a List Not too bad, let's increase the difficulty a bit by: - Adding an unordered list (`