kitze / mobx-router

A simple router for MobX + React apps
509 stars 66 forks source link

Split into router, react and react-native proposal/discussion #2

Closed pietgk closed 8 years ago

pietgk commented 8 years ago

Kristijan, i would like to use mobx-router in a react-native project.

we should agree on how to tackle this.

any suggestions?

--piet

kitze commented 8 years ago

Hey @pietgk i already have an idea about this. It's a pretty simple change actually!

pietgk commented 8 years ago

Hi @Kitze, let me know if i can help.

On 29 Sep 2016, at 01:08, Kristjian Ristovski notifications@github.com wrote:

Hey @pietgk https://github.com/pietgk i already have an idea about this. It's a pretty simple change actually!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kitze/mobx-router/issues/2#issuecomment-250327611, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkQ5C0_c4RAlEFb8giB4Bqg0tpfPlM4ks5quvN2gaJpZM4KG8Pd.

kitze commented 8 years ago

@pietgk you can already use this with react-native. Just don't call the startRouter function anywhere. The startRouter function is responsible for handling the url and the changes in the url.

kitze commented 8 years ago

@pietgk when I think about it, this doesn't make any sense for react-native right now. It will work, but you won't get any "back button" functionality because the views are not pushed into a stack. The old view is just replaced with a new view.

pietgk commented 8 years ago

@kitze,

I like the simplicity and separation of mobx-router. My RN app already needs some logic to handle back in a web view combined with react-native-router-flux. I will give it a try when the app is in the app stores and i can take the time for refactoring routing.

This afaikt would mean implementing a stack for back button functionality.

Then I wonder if we/i would need a new repository for a RN version.

On 01 Oct 2016, at 23:07, Kitze notifications@github.com wrote:

@pietgk https://github.com/pietgk when I think about it, this doesn't make any sense for react-native right now. It will work, but you won't get any "back button" functionality because the views are not pushed into a stack. The old view is just replaced with a new view.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kitze/mobx-router/issues/2#issuecomment-250937699, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkQ5EDsJCsh0l8ichbiNGF0xxaYywcsks5qvsuPgaJpZM4KG8Pd.

kitze commented 8 years ago

@pietgk for now i will focus on the web version of mobx-router, you can of course fork it and try to do a reasonable PR that will allow integration with react-native.

Cheers