vadimdemedes/dom-chef

Skip undefined attributes

fregante opened this issue · 0 comments

<a href={undefined}>No link</a>

Results in

React.createElement("a", {
  href: undefined
}, "No link");

You can test this code on https://jscomplete.com/playground

ReactDOM.render(<a href={undefined}>No link</a>, document.body)

React does not add a href attribute but dom-chef creates it and sets it to 'undefined'