across projects • Component names start with a capital le9er • (lowercase are reserved for HTML elements) • Every component has a list of a9ributes (properDes, props)
type: "submit" }, props.label ) ReactDOM.render( React.createElement(Button, { label: "Save" }), mountNode ) You can see why we use JSX instead of createElement calls, very similar to HTML makes it easier to read
a-ributes (events included) are named using camelCase, rather than lowercase. It’s onClick, not onclick." And "We pass an actual JavaScript func3on reference as the event handler, rather than a string. It’s onClick={handleClick}, not onClick="handleClick"."
of components, state only applies to class based components, other components are classified as dumb or stateless • Hand over to eggheadio - Use Component State with React from @kentcdodds on @eggheadio • This is the most important thing to learn • React monitors every component for state changes
dom diffing The Virtual DOM is an abstrac3on of the HTML DOM. It is lightweight and detached from the browser-specific implementa3on details. Since the DOM itself was already an abstrac3on, the virtual DOM is, in fact, an abstrac3on of an abstrac3on. • Watches for changes and Reacts