score:3

Accepted answer
import React from 'react';
import Badge from './Badge.react';

class Dropdown extends React.Component {
    whenClicked() {
        console.log('blabla');
    }

    render() {
        return (
            <div className="dropdown">
                <Badge whenClicked={this.whenClicked} className="btn btn-default"
                title={this.props.title} subTitleClassName="caret" subTitle="subTitle"/>
            </div>
        );
    }
}

module.exports = Dropdown;

score:2

export class Dropdown extends Component {
  whenClicked(event) {
      // Your event handler
  },
  render() {
    return (
      <div className="dropdown">
        <Badge whenClicked={this.whenClicked} className="btn btn-default" title={this.props.title} subTitleClassName="caret" />
      </div>    
    );
  }
}

Related Query

More Query from same tag