Tutorial by Examples

There are several different ways to specify props in JSX. JavaScript Expressions You can pass any JavaScript expression as a prop, by surrounding it with {}. For example, in this JSX: <MyComponent count={1 + 2 + 3 + 4} /> Inside the MyComponent, the value of props.count will be 10, becau...
In JSX expressions that contain both an opening tag and a closing tag, the content between those tags is passed as a special prop: props.children. There are several different ways to pass children: String Literals You can put a string between the opening and closing tags and props.children will ju...

Page 1 of 1