Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
rudux with react-native dont work -- (0, _combineReducers.default) is not a function

i made exactly same like in react app, but in react is working, in react-native doesnt work

app.js file

import React from 'react';
import { Provider } from 'react-redux';
import { store } from './redux/reducers/combineReducers'

var Stack = createNativeStackNavigator()
export default function App() {
  return (<Provider store={store()}>  // if i write store={store} error: undefined is not an object (evaulating 'store.getStare')
      </Provider>
  );
}

combinedReducers.js

import { key} from "./reducerKey";

    import { combineReducers } from 'redux'
    
    export var reducers = combineReducers({
        storeKey: key,
    })

reducerKey file

export var key = (state = 0, action) => {
    if (action.type === 'changeKey') {
        return action.playload
    }
    else {
        return state
    }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You didn't create the store instead you are trying to export the reducer.

In the combinedReducers.js:

import {createStore, combineReducers} from 'redux';

const rootReducer = combineReducers({
   storeKey: key,
})

const store = createStore(rootReducer)

export {store}

Now in the App.js, you can use the store (without calling it):

import {store} from 'path/to/store';

// rest of the codes ...
<Provider store={store}>
// rest of the codes ...
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!