Просмотр исходного кода

81405 remove unnecessary comments

Yohei-Shiina 4 лет назад
Родитель
Сommit
ae581ea312
1 измененных файлов с 0 добавлено и 4 удалено
  1. 0 4
      packages/app/src/components/SearchPage.jsx

+ 0 - 4
packages/app/src/components/SearchPage.jsx

@@ -106,8 +106,6 @@ class SearchPage extends React.Component {
    * this method is called when user changes paging number
    */
   async onPagingNumberChanged(activePage) {
-    // this.setState does not change the state immediately and following calls of this.search outside of this.setState will have old activePage state.
-    // To prevent above, pass this.search as a callback function to make sure this.search will have the latest activePage state.
     this.setState({ activePage }, () => this.search({ keyword: this.state.searchedKeyword }));
   }
 
@@ -115,8 +113,6 @@ class SearchPage extends React.Component {
    * this method is called when user searches by pressing Enter or using searchbox
    */
   async onSearchInvoked(data) {
-    // this.setState does not change the state immediately and following calls of this.search outside of this.setState will have old activePage state.
-    // To prevent above, pass this.search as a callback function to make sure this.search will have the latest activePage state.
     this.setState({ activePage: 1 }, () => this.search(data));
   }