Skip to content

Commit

Permalink
Fix and Improve markdown markup in 07.spreading-props-dom.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch-Valentine committed Mar 28, 2017
1 parent 209baa4 commit 07aef13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions anti-patterns/07.spreading-props-dom.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Spreading props on DOM elements
When we spread props we run into the risk of adding unknown HTML attributes, which is a bad practice.

###Reference:
- React Design Patterns and best practices by Michele Bertoli

### Reference:
- [React Design Patterns and best practices by Michele Bertoli.](https://github.com/MicheleBertoli/react-design-patterns-and-best-practices)

##### BAD
This will try to add the unknown HTML attribute `flag` to the DOM element
This will try to add the unknown HTML attribute `flag` to the DOM element.
```javascript
const Sample = () => (<Spread flag={true} className="content"/>);
const Spread = (props) => (<div {...props}>Test</div>);
Expand Down

0 comments on commit 07aef13

Please sign in to comment.