Instead of artificially separating technologies by putting markup and logic in separate files, React separates concerns with loosely coupled units called “components” that contain both. React embraces the fact that rendering logic is inherently coupled with other UI logic: how events are handled, how the state changes over time, and how the data is prepared for display. Below, you can find the basics of JSX necessary to get you started. We will explore rendering them to the DOM in the next section. JSX may remind you of a template language, but it comes with the full power of JavaScript. We recommend using it with React to describe what the UI should look like. It is called JSX, and it is a syntax extension to JavaScript. This funny tag syntax is neither a string nor HTML.
0 Comments
Leave a Reply. |