Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluating'(0,_reactNative.connect)(function(state){return{nav:state.nav};})') #15997

Closed
jctadios opened this issue Sep 19, 2017 · 2 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@jctadios
Copy link

Is this a bug report?

No

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native:0.47.2
  2. node -v: v8.2.1
  3. npm -v: 4.6.1
  4. yarn --version:

Then, specify:

  • Target Platform: Andriod
  • Development Operating System: windows 7 ultimate version 6.1
  • Build tools: Expo

Code:

import React, {Component} from 'react'
import {Provider, connect} from 'react-native'
import {StackNavigator, addNavigationHelpers} from 'react-navigation'

import Routes from './config/routes'
import getStore from './store'

const Navigator = StackNavigator(Routes, {
headerMode: 'none'
})

const navReducer = (state, action) => {
const newState = Navigator.router.getStateForAction(action, state)
return newState || state
}

class App extends Component {
render(){
return(
<Navigator
navigation={addNavigationHelpers({
dispatch: this.props.dispatch,
state: this.props.nav
})}
/>
)
}
}

const store = getStore(navReducer)
const AppIndex = connect( state => ({ nav: state.nav }) )(App)

export default Index = () => {
return (
<Provider store={store}>
<AppIndex />
</Provider>
)
}

@chirag04
Copy link
Contributor

@facebook-github-bot stack-overflow

@facebook-github-bot
Copy link
Contributor

Hey @jctadios, thanks for posting this! @chirag04 tells me this issue looks like a question that would be best asked on Stack Overflow. Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. See "What to Expect from Maintainers".

@facebook-github-bot facebook-github-bot added the Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. label Sep 19, 2017
@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Sep 19, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Sep 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants