Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Splitter ListItem Uncaught SyntaxError: Unexpected token (

  • I am trying to set up a Splitter menu with a logout ListItem. Unfortunately when I click on logout I get the error in the title. If I debug the source at (index):1 then I get

    function () {
          var _this4;
          return (_this4 = _this).__logoutHandler__REACT_HOT_LOADER__.apply(_this4, arguments);

    As you can see the function has no name which agrees with the error. Below is render() of MainPage.js

    render() {
        const { trips, navigator } = this.props;
        return (
          <Splitter >
            <SplitterSide id="menu" side="right" width="120px" collapse>
                  <ListItem onclick={this.logoutHandler} tappable>
                    <p >&nbsp;&nbsp;&nbsp;Logout</p>
            <SplitterContent id="content">
              <Page renderToolbar={() => <NavBar showMenuHandler={this.showMenuHandler} navigator={navigator} />}>
                <AddTripButton clickHandler={this.addTrip} />
                  <div className="content">
                    {trips && <TripList trips={trips} navigator={navigator} />}

    logoutHandler dispatches an action

    logoutHandler = () => {

    If I substitute logoutHandler in the render code above like this:-

    NavBar showMenuHandler={this.logoutHandler}

    then logoutHandler is called OK when I click on the menu icon, which suggests that there is something wrong with ListItem. Unfortunately I cannot get any further witht the debugging. Any ideas?

    OnsenUI noob

  • In Firefox I get

    SyntaxError: function statement requires a name[Learn More]

    I am using 2.10.5