I have a react app using react router.
When i bundle this up into phonegap and connect to it using the phonegap app on my iPhone, i go straight to my 404 (not found) page.
From my 404 page i am then able to navigate to the rest of my app (if i include the menu on the page)
Below is my react router code, has anyone faced a similar issue?
actions = {"a1", "a2", "a3"}
informations = {"i1", "i2", "i3"}
p = argparse.ArgumentParser()
# Contents of actions and informations contrived
# to make the example short. You may need a series
# of calls to add_argument to define the options and
# constants properly
for ai in actions + informations:
p.add_argument("--" + ai, action='append_const', const=ai, dest=infoactions)
args = p.parse_args()
if not args.infoactions:
p.error("At least one action or information required")
elif len(actions.intersection(args.infoactions)) > 1:
p.error("At most one action allowed")
答案 0 :(得分:2)
我最近遇到了类似的问题,并且能够使用routerHistory
代替默认browserHistory
来解决此问题。
具体实现方式取决于您所使用的React Router版本。
我按照v2.0迁移指南来实现它: