title: How would I fix the Syntax error I'm getting on my handleChange function?
body: <p>I'm getting the following error in the console.</p>
  
  <p>It's something wrong about the handler.</p>
  
  <p><img src="https://i.stack.imgur.com/WnmlT.png" alt="the error message picture here"></p>
  
  <p>I'm not sure what's going on, but here the entire component code.</p>
  
  <pre><code>import React from 'react';
  import TextWidget from './TextWidget';
  
  /*
   * Handles removing dashes from SSNs by keeping the user input in local state
   * and saving the transformed version instead
   */
  export default class SSNWidget extends React.Component {
    constructor(props) {
      super(props);
      this.state = { val: props.value };
    }
    handleChange = val =&gt; {
      // If val is blank or undefined, pass undefined to onChange
      let strippedSSN;
      if (val) {
        strippedSSN = val.replace(/[- ]/g, '');
      }
  
      this.setState({ val }, () =&gt; {
        this.props.onChange(strippedSSN);
      });
    };
    render() {
      return (
        &lt;TextWidget
          {...this.props}
          value={this.state.val}
          onChange={this.handleChange}
        /&gt;
      );
    }
  }
  </code></pre>