Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- var PropTypes = React.PropTypes;
- function Item(props) {
- console.log("onClickFunction: ", props.onClickFunction); //Here I can see the function
- return (
- <div className="content">
- <button className="ui" onClick={props.onClickFunction}>{props.category}</button>
- </div>
- );
- }
- Item.propTypes = {
- onClickFunction: PropTypes.func.isRequired,
- category: PropTypes.string.isRequired
- }
- export default Item;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement