Skip to content

Commit

Permalink
Fix react-unknown-prop warning in the tweet example (facebookarchive#620
Browse files Browse the repository at this point in the history
)

* Fix react-unknown-prop warning in the tweet example

Ref: [https://facebook.github.io/react/warnings/unknown-prop.html]()

* Add data-offset-key
  • Loading branch information
wuct authored and flarnie committed Oct 5, 2016
1 parent 1559e9f commit 478e0ef
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions examples/tweet/tweet.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,25 @@
}

const HandleSpan = (props) => {
return <span {...props} style={styles.handle}>{props.children}</span>;
return (
<span
style={styles.handle}
data-offset-key={props.offsetKey}
>
{props.children}
</span>
);
};

const HashtagSpan = (props) => {
return <span {...props} style={styles.hashtag}>{props.children}</span>;
return (
<span
style={styles.hashtag}
data-offset-key={props.offsetKey}
>
{props.children}
</span>
);
};

const styles = {
Expand Down

0 comments on commit 478e0ef

Please sign in to comment.