reapp / reapp-routes

Simple route DSL
MIT License
34 stars 13 forks source link

Blank screen on start on Android (due to different root URL) #9

Closed boazy closed 9 years ago

boazy commented 9 years ago

The root URL in the Android version of Cordova is file:///android_asset/www/index.html instead of just '/' as it would be on the browser. This causes react-router to fail when it tries to recognize the current URL when it starts up. I can think of several clever fixes for this (e.g. creating a custom location object for react-router).

But since we don't really display or use the URL (and since someone might be crazy enough to want to support old Android versions without using Crosswalk), the best solution is to do what iOS does and give up on history.pushState() and use a hash router instead.

mbrochh commented 9 years ago

+1