Usage with React Router
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
Navigatorcomponent manages routing, but my app already have
react-routerfor this task. Is it possible for them to be “friends”?
An example would be much appreciated.
@romulof Thanks for trying it out!
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.