question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Actions.replace: There is no route defined for Key X

See original GitHub issue

Version

Tell us which versions you are using:

](url)
  • react-native-router-flux v4.0.1
  • react v16.3.1
  • react-native v0.55.4
const scenes = Actions.create(
            <Lightbox>
                <Scene key="root">
                    <Scene hideNavBar activeTintColor={AppColors.primary} key="main" tabBarPosition={'bottom'}
                           tabs={true}>
                        <Scene hideNavBar key="index" title="首页" icon={TabIcon('\ue62f')} component={index}/>
                        <Scene hideNavBar key="category" title="商品分类" icon={TabIcon('\ue634')} component={category}/>
                        <Scene hideNavBar key="cart" title="购物车" icon={observer(TabIcon('\ue63f', 'cart'))}
                               component={cart}/>
                        <Scene hideNavBar key="user" title="我的" icon={TabIcon('\ue6e6')} component={User}/>
                    </Scene>

                </Scene>
            </Lightbox>);

Steps to reproduce

1.yarn add aksonov/react-native-router-flux 2.in page ‘index’ when using Actions.replace(“cart”) get error : There is no route defined for key undefined Must be one of :‘index’,‘category’,‘test’,‘cart’,‘user’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
daviscabralcommented, Sep 14, 2018

I am working in a fix for it.

0reactions
daviscabralcommented, Sep 25, 2018

On 25 Sep 2018, at 04:05, 默 notifications@github.com wrote: running well in my project, great

Great. Closing this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: There is no route defined for key X Must be one ...
I'm trying to make it so that whenever users click the B tab, the B stack resets, so the user is always served...
Read more >
NavigationActions reference - React Navigation
The Replace action replaces the route at the given key with another route. key - _string - required - Key of the route...
Read more >
Rails Routing from the Outside In - Ruby on Rails Guides
How to declare route parameters, which are passed onto controller actions. ... Change :username in the route definition if you do not want...
Read more >
How React Hooks can replace React Router - LogRocket Blog
Read more to find out how React Hooks can replace React Router. ... In the routes object, you define your routes as keys...
Read more >
Working with routes for HTTP APIs - Amazon API Gateway
You can define specific HTTP methods for your route. ... If there's no $default stage, then the API returns {"message":"Not Found"} .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found