Function misspelling not prompted when developing jsx


#1

Hello,
I have made a spelling mistake in this part of jsx code, I spelled handleChange to handllChange in the input item. And I took half an hour to find the mistake.
How can I get some prompt when this kind of mistake occured?
Thank you very much!

Harvy

var SearchBar = React.createClass({

  handleChange: function () {
    this.props.onUserInput(
      this.refs.filterTextInput.value,
      this.refs.inStockOnlyInput.checked
    );
  },

  render: function() {
    return (
      <form>
        <input
          type="text"
          placeholder="Search..."
          value={this.props.filterText}
          ref="filterTextInput"
          onChange={this.handllChange}
        />
        <p>
          <input
            type="checkbox"
            checked={this.props.inStockOnly}
            ref="inStockOnlyInput"
            onChange={this.handleChange}
          />
          {' '}
          Only show products in stock
        </p>
      </form>
    );
  }
});

#2

You might want to look and see if there is an autocomplete package that works for JSX. But this is a problem with templating languages in general, they are hard to statically check properly.