Skip to content

Warn early if event listener is not a function #10407

@gaearon

Description

@gaearon

We used to throw if event listener is not a function in Stack:

ReactDOM.render(
  <h1 onClick={{}}>Hello World!</h1>,
  document.getElementById('container')
);

screen shot 2017-08-08 at 3 41 08 pm

Fiber silently ignores this.

I think we should throw. This would let us add support for objects (e.g. for passive listener configuration) if we want to in a minor rather than a major.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions