Chapter 3. Creating Your First React Element
Creating a simple web application today involves writing HTML, CSS, and JavaScript code. The reason we use three different technologies is that we want to separate three different concerns:
- Content (HTML)
- Styling (CSS)
- Logic (JavaScript)
This separation works great for creating a web page because traditionally, we had different people working on different parts of our web page: one person structured the content using HTML and styled it using CSS, and then another person implemented the dynamic behavior of various elements on that web page using JavaScript. It was a content-centric approach.
Today, we mostly don't think of a website as a collection of web pages anymore. Instead, we build web applications that might have only one web page and that web page does not represent the layout for our content—it represents a container for our web application. Such a web application with a single web page is called (unsurprisingly) a Single...