;
+ }
+}
+
+function BlueDatePicker() {
+ return ;
+}
+
+// ----------------------------------------
+// ----------------------------------------
+import React from 'react';
+
+// Wrong! This is a component and should have been capitalized:
+function hello(props) {
+ // Correct! This use of
is legitimate because div is a valid HTML tag:
+ return
Hello {props.toWhat}
;
+}
+
+function HelloWorld() {
+ // Wrong! React thinks is an HTML tag because it's not capitalized:
+ return ;
+}
+
+// ----------------------------------------
+// ----------------------------------------
+import React from 'react';
+
+// Correct! This is a component and should be capitalized:
+function Hello(props) {
+ // Correct! This use of
is legitimate because div is a valid HTML tag:
+ return
Hello {props.toWhat}
;
+}
+
+function HelloWorld() {
+ // Correct! React knows is a component because it's capitalized.
+ return ;
+}
+
+// ----------------------------------------
+// ----------------------------------------
+
+import React from 'react';
+import { PhotoStory, VideoStory } from './stories';
+
+const components = {
+ photo: PhotoStory,
+ video: VideoStory
+};
+
+function Story(props) {
+ // Should be white !
+ // ||
+ // \/
+ // Wrong! JSX type can't be an expression.
+ return ;
+}
+
+// ----------------------------------------
+// ----------------------------------------
+
+
+
+// ----------------------------------------
+// ----------------------------------------
+
+function NumberDescriber(props) {
+ let description;
+ if (props.number % 2 == 0) {
+ description = even;
+ } else {
+ description = odd;
+ }
+ return
+
+// ----------------------------------------
+// ----------------------------------------
+
+
+
+// ----------------------------------------
+// ----------------------------------------
+
+render() {
+ // No need to wrap list items in an extra element!
+ return [
+ // Don't forget the keys :)
+
;
+}
+
+// ----------------------------------------
+// ----------------------------------------
+
+// Calls the children callback numTimes to produce a repeated component
+function Repeat(props) {
+ let items = [];
+ for (let i = 0; i < props.numTimes; i++) {
+ items.push(props.children(i));
+ }
+ return