Viewing React from 20,000 Meters
This section is written for those of us who haven’t used React or aren’t familiar with it. (Yes, that includes me.)
React lets you think of a web page as consisting of components. A component accepts input (properties, also called props) and returns “React elements describing what should appear on the screen.”[37] You can write these as functions, or you can use a notation called JSX, an extension to JavaScript that lets you write HTML-like expressions mixed with JavaScript code. ReasonML also lets you use JSX-style notation that contains ReasonML code.
An example of a component might be a Notice component with properties that describe the the message text, the color of the text, and the icon to display with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access