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.

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.