49 {({ active }) => (
50 <button
51 type="button"
52 onClick={item.onClick}53 className={classNames(
54 active ? 'text-neutral-100' : 'text-neutral-400',
55 'block px-4 py-2 text-sm'
Ensures that any component or prop methods used to handle events are correctly prefixed.
<MyComponent handleChange={this.handleChange} />
// Example 2
<MyComponent onChange={this.componentChanged} />
<MyComponent onChange={this.handleChange} />
// Example 2
<MyComponent onChange={this.props.onFoo} />