facebook/react — pull request #2266 by syranide (2014-09-28 09:55:33+00:00)
Title: ReactDOMComponent should not accept children for void elements

Throw invariant for *void elements* with children, void elements also avoid all overhead related to processing children props.

`menuitem` is a void element but still requires the closing tag to combat browser behavior. After much back-and-forth I chose to use `menuitem: null` to set this special behavior (rather than a separate call to `createDOMComponentClass`). If you disagree and prefer the verbose path then I won't disagree.

Test plan: `grunt test`