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.

Usage with React Router

  • Hi,

    I’m making a React based mobile webapp and have just discovered Onsen UI. So far I’m amazed, and my only concerns are about its integration with React.

    For what I’ve read, the Navigator component manages routing, but my app already have react-router for this task. Is it possible for them to be “friends”?

    An example would be much appreciated.

  • @romulof Thanks for trying it out! :+1:

    I’ve already answered in the issue but I will paste the answer here as well:

    I was trying to integrate the Navigator component with react-router but the code was very hacky.

    Maybe I will make another attempt and see if it’s possible to create a wrapper component that you can use together with react-router.

    In the end we will probably create a new component with an API that better integrates with things like react-router and Redux. Right now the component has methods like pushPage() and popPage() that makes things hard. A better option would be to make it possible to navigate using props.

    So basically it’s possible to integrate it but the current API makes it a bit cumbersome.