Reactjs 使用Onsen列表时单击“不在React中工作”?

Reactjs 使用Onsen列表时单击“不在React中工作”?,reactjs,onclick,onsen-ui,Reactjs,Onclick,Onsen Ui,下面是我的代码行,其中有一个问题: <ons-list-item onclick={this.toBonusSummary} tappable>Bonus Summary</ons-list-item> 仍在开发中&大部分是复制粘贴的代码 有没有解释一下为什么在我的情况下,单击一个ons列表项不起作用 PS:其他的onclick链接不起作用,实际上是多余的。React区分大小写,在这种情况下onclick应该使用大写字母C-onclickReact区分大小写,在这种情况

下面是我的代码行,其中有一个问题:

<ons-list-item onclick={this.toBonusSummary} tappable>Bonus Summary</ons-list-item>
仍在开发中&大部分是复制粘贴的代码

有没有解释一下为什么在我的情况下,单击一个
ons列表项
不起作用


PS:其他的onclick链接不起作用,实际上是多余的。

React区分大小写,在这种情况下onclick应该使用大写字母C-
onclick
React区分大小写,在这种情况下onclick应该使用大写字母C-
onclick

不太了解ons,但我认为onclick应该是大写的C-onClick@Majky是的,它修复了错误。如果你能加上这个作为答案,等我醒来后我会接受的。谢谢!我不太了解ons,但我认为onclick应该是大写C-onClick@Majky是的,它修复了错误。如果你能加上这个作为答案,等我醒来后我会接受的。谢谢!
<Ons.Splitter>
                <Ons.SplitterSide
                  style={{
                      boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)'
                  }}
                  side='left'
                  width={300}
                  collapse={true}
                  isSwipeable={true}
                  isOpen={this.state.menuOpen}//will open once you click the menu button
                  onClose={this.closeMenu}
                  onOpen={this.openMenu}
                >
                    {/*Sidebar Content*/}
                    <Ons.Page renderToolbar={this.renderSidebar}>
                                        {/*start of list*/}
                                        <ons-list>
                                            <ons-list-item onclick="fn.load('home.html')" tappable>Home</ons-list-item>
                                            <ons-list-item onclick={this.toBonusSummary} tappable>Bonus Summary</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Sign Up</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Upgrade Package</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Group</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Finance</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Buy/Sell Credit</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Promo Pin Buy/Sell</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Information Centre</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>iChat</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Settings</ons-list-item>
                                            <ons-list-item onclick="fn.load('about.html')" tappable>Log Out</ons-list-item>
                                          </ons-list>
                                        {/*end of list*/}
                    </Ons.Page>
                    {/*End of Sidebar Content*/}
                </Ons.SplitterSide>

                {/*Page Content*/}
                <Ons.SplitterContent>
                  <Ons.Page renderToolbar={this.renderToolbar}>
                    <PageContent data-pageName={this.state.pageClicked} onChange={this.closeMenu} name={this.state.username} data-defaultOption={'a'} value={'a'} data-error={'a'} data-options={[]}/>
                  </Ons.Page>
                </Ons.SplitterContent>
            {/*End of Page Content*/}
              </Ons.Splitter>