Monaca Onsen UI Discord Chat Github Repo

Navigator.resetToPage in react onsen

  • error in onsen and react-onsen
    in onsen library, the function for clearing page stack is called resetToPage
    but in react-onsen library, the same function is called resetPage

  • administrators

    Thanks for pointing out this inconsistency.

    I agree that the name difference is confusing, although we don’t actually guarantee that all method names are the same across all frameworks especially in this case because, unlike most other components, the react Navigator doesn’t actually use the underlying ons-navigator. In this case, I think resetToPage is the better name.

    I don’t think we can actually rename resetPage to resetToPage until we do another minor release because that would break all the apps that use that method. In this case, I think it would be best to create an alias until the next minor release.