React Native - (0, _redux.combineReducers) is not a function
I'm currently learning some redux in React Native. But i keep stumbling on one error if i try to combine my reducers in a index.js file.
(0, _redux.combineReducers) is not a function
I watched some tutorials for how to use this and I follow with every step but it's keep coming on my screen.
My App.js looks like this:
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import ReduxThunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers/reducers';
import { Header } from './components/common/Header';
let store = createStore(reducers, applyMiddleware(ReduxThunk));
export default class App extends Component {
render() {
return (
<Provider store={ store }>
<View style={ styles.container }>
<Header title="Tech Stack"/>
</View>
</Provider>
);
}
}
My reducers.js in the folder src/reducers:
console.log('HELLO');
import { combineReducers } from 'redux';
console.log( combineReducers );
import LibraryReducer from './LibraryReducer';
const reducers = combineReducers({
libraries: LibraryReducer
});
export default reducers;
// Fixed the log. When i'm loggin combineReducers i get undefined.
LibraryReducer.js
import data from '../data/LibraryList.json';
export default () => data;
Console errors:
[Error log][1]
data json:
[
{
"id": 0,
"title": "React",
"description": "JS framework"
},
{
"id": 1,
"title": "Vue",
"description": "JS framework"
},
{
"id": 2,
"title": "Angular",
"description": "JS framework"
}
]
package.json
{
"name": "redux",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
THANK YOU ALL for your suggestions!
SOLVED:
Started a new project but don't gave it the name redux itself.
reactjs react-native redux react-redux reducers
add a comment |
I'm currently learning some redux in React Native. But i keep stumbling on one error if i try to combine my reducers in a index.js file.
(0, _redux.combineReducers) is not a function
I watched some tutorials for how to use this and I follow with every step but it's keep coming on my screen.
My App.js looks like this:
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import ReduxThunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers/reducers';
import { Header } from './components/common/Header';
let store = createStore(reducers, applyMiddleware(ReduxThunk));
export default class App extends Component {
render() {
return (
<Provider store={ store }>
<View style={ styles.container }>
<Header title="Tech Stack"/>
</View>
</Provider>
);
}
}
My reducers.js in the folder src/reducers:
console.log('HELLO');
import { combineReducers } from 'redux';
console.log( combineReducers );
import LibraryReducer from './LibraryReducer';
const reducers = combineReducers({
libraries: LibraryReducer
});
export default reducers;
// Fixed the log. When i'm loggin combineReducers i get undefined.
LibraryReducer.js
import data from '../data/LibraryList.json';
export default () => data;
Console errors:
[Error log][1]
data json:
[
{
"id": 0,
"title": "React",
"description": "JS framework"
},
{
"id": 1,
"title": "Vue",
"description": "JS framework"
},
{
"id": 2,
"title": "Angular",
"description": "JS framework"
}
]
package.json
{
"name": "redux",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
THANK YOU ALL for your suggestions!
SOLVED:
Started a new project but don't gave it the name redux itself.
reactjs react-native redux react-redux reducers
add a comment |
I'm currently learning some redux in React Native. But i keep stumbling on one error if i try to combine my reducers in a index.js file.
(0, _redux.combineReducers) is not a function
I watched some tutorials for how to use this and I follow with every step but it's keep coming on my screen.
My App.js looks like this:
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import ReduxThunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers/reducers';
import { Header } from './components/common/Header';
let store = createStore(reducers, applyMiddleware(ReduxThunk));
export default class App extends Component {
render() {
return (
<Provider store={ store }>
<View style={ styles.container }>
<Header title="Tech Stack"/>
</View>
</Provider>
);
}
}
My reducers.js in the folder src/reducers:
console.log('HELLO');
import { combineReducers } from 'redux';
console.log( combineReducers );
import LibraryReducer from './LibraryReducer';
const reducers = combineReducers({
libraries: LibraryReducer
});
export default reducers;
// Fixed the log. When i'm loggin combineReducers i get undefined.
LibraryReducer.js
import data from '../data/LibraryList.json';
export default () => data;
Console errors:
[Error log][1]
data json:
[
{
"id": 0,
"title": "React",
"description": "JS framework"
},
{
"id": 1,
"title": "Vue",
"description": "JS framework"
},
{
"id": 2,
"title": "Angular",
"description": "JS framework"
}
]
package.json
{
"name": "redux",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
THANK YOU ALL for your suggestions!
SOLVED:
Started a new project but don't gave it the name redux itself.
reactjs react-native redux react-redux reducers
I'm currently learning some redux in React Native. But i keep stumbling on one error if i try to combine my reducers in a index.js file.
(0, _redux.combineReducers) is not a function
I watched some tutorials for how to use this and I follow with every step but it's keep coming on my screen.
My App.js looks like this:
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import ReduxThunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers/reducers';
import { Header } from './components/common/Header';
let store = createStore(reducers, applyMiddleware(ReduxThunk));
export default class App extends Component {
render() {
return (
<Provider store={ store }>
<View style={ styles.container }>
<Header title="Tech Stack"/>
</View>
</Provider>
);
}
}
My reducers.js in the folder src/reducers:
console.log('HELLO');
import { combineReducers } from 'redux';
console.log( combineReducers );
import LibraryReducer from './LibraryReducer';
const reducers = combineReducers({
libraries: LibraryReducer
});
export default reducers;
// Fixed the log. When i'm loggin combineReducers i get undefined.
LibraryReducer.js
import data from '../data/LibraryList.json';
export default () => data;
Console errors:
[Error log][1]
data json:
[
{
"id": 0,
"title": "React",
"description": "JS framework"
},
{
"id": 1,
"title": "Vue",
"description": "JS framework"
},
{
"id": 2,
"title": "Angular",
"description": "JS framework"
}
]
package.json
{
"name": "redux",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
THANK YOU ALL for your suggestions!
SOLVED:
Started a new project but don't gave it the name redux itself.
reactjs react-native redux react-redux reducers
reactjs react-native redux react-redux reducers
edited Nov 21 '18 at 23:42
PeeJee
asked Nov 21 '18 at 21:53
PeeJeePeeJee
9816
9816
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
So first of all i would install ReduxThunk on your project folder, so run following:
npm i redux-thunk --save
next in your App.js
import this lib like so
import ReduxThunk from 'redux-thunk'
then create the Redux Store
const store = createStore(reducers, applyMiddleware(ReduxThunk))
the Method for creating the reducers functions should be at the end of your reducers.js
file like so.
const reducers = combineReducers({
libraries,
//otherFunctions...
});
export default reducers;
don´t forget to import the combineReducers method from redux in your reducers.js
file.
import { combineReducers } from 'redux';
combineReducers method accept functions that you previously declared in your reducers.js
for expample following ( im writing...)
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
default:
return state
}
}
you should be able to write many cases for the switch
statement as you want. for example..
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
case "isLogginSuccess":
return {...state, isLoggedIn: action.payload}
default:
return state
}
}
the reducer case "isLogginSuccess" should be trigered by calling another funcion inse your desired component.
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
|
show 6 more comments
It looks like you have the same issue as here.
TLDR: rename the folder you have called redux
to something else, wipe your node_modules
and reinstall and it should work.
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
add a comment |
We looked at a lot of different things, but the problem was one with module resolution. import { combineReducers } from 'redux'
was not working, apparently because the project, itself, was given the name 'redux' in its package.json file and/or because a folder in the project's root was named 'redux'.
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
|
show 15 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420983%2freact-native-0-redux-combinereducers-is-not-a-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
So first of all i would install ReduxThunk on your project folder, so run following:
npm i redux-thunk --save
next in your App.js
import this lib like so
import ReduxThunk from 'redux-thunk'
then create the Redux Store
const store = createStore(reducers, applyMiddleware(ReduxThunk))
the Method for creating the reducers functions should be at the end of your reducers.js
file like so.
const reducers = combineReducers({
libraries,
//otherFunctions...
});
export default reducers;
don´t forget to import the combineReducers method from redux in your reducers.js
file.
import { combineReducers } from 'redux';
combineReducers method accept functions that you previously declared in your reducers.js
for expample following ( im writing...)
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
default:
return state
}
}
you should be able to write many cases for the switch
statement as you want. for example..
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
case "isLogginSuccess":
return {...state, isLoggedIn: action.payload}
default:
return state
}
}
the reducer case "isLogginSuccess" should be trigered by calling another funcion inse your desired component.
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
|
show 6 more comments
So first of all i would install ReduxThunk on your project folder, so run following:
npm i redux-thunk --save
next in your App.js
import this lib like so
import ReduxThunk from 'redux-thunk'
then create the Redux Store
const store = createStore(reducers, applyMiddleware(ReduxThunk))
the Method for creating the reducers functions should be at the end of your reducers.js
file like so.
const reducers = combineReducers({
libraries,
//otherFunctions...
});
export default reducers;
don´t forget to import the combineReducers method from redux in your reducers.js
file.
import { combineReducers } from 'redux';
combineReducers method accept functions that you previously declared in your reducers.js
for expample following ( im writing...)
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
default:
return state
}
}
you should be able to write many cases for the switch
statement as you want. for example..
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
case "isLogginSuccess":
return {...state, isLoggedIn: action.payload}
default:
return state
}
}
the reducer case "isLogginSuccess" should be trigered by calling another funcion inse your desired component.
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
|
show 6 more comments
So first of all i would install ReduxThunk on your project folder, so run following:
npm i redux-thunk --save
next in your App.js
import this lib like so
import ReduxThunk from 'redux-thunk'
then create the Redux Store
const store = createStore(reducers, applyMiddleware(ReduxThunk))
the Method for creating the reducers functions should be at the end of your reducers.js
file like so.
const reducers = combineReducers({
libraries,
//otherFunctions...
});
export default reducers;
don´t forget to import the combineReducers method from redux in your reducers.js
file.
import { combineReducers } from 'redux';
combineReducers method accept functions that you previously declared in your reducers.js
for expample following ( im writing...)
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
default:
return state
}
}
you should be able to write many cases for the switch
statement as you want. for example..
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
case "isLogginSuccess":
return {...state, isLoggedIn: action.payload}
default:
return state
}
}
the reducer case "isLogginSuccess" should be trigered by calling another funcion inse your desired component.
So first of all i would install ReduxThunk on your project folder, so run following:
npm i redux-thunk --save
next in your App.js
import this lib like so
import ReduxThunk from 'redux-thunk'
then create the Redux Store
const store = createStore(reducers, applyMiddleware(ReduxThunk))
the Method for creating the reducers functions should be at the end of your reducers.js
file like so.
const reducers = combineReducers({
libraries,
//otherFunctions...
});
export default reducers;
don´t forget to import the combineReducers method from redux in your reducers.js
file.
import { combineReducers } from 'redux';
combineReducers method accept functions that you previously declared in your reducers.js
for expample following ( im writing...)
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
default:
return state
}
}
you should be able to write many cases for the switch
statement as you want. for example..
const INITIAL_STATE = { isLoggedIn: false }
function libraries(state = INITIAL_STATE, action){
switch (action.type) {
case "isLogginSuccess":
return {...state, isLoggedIn: action.payload}
default:
return state
}
}
the reducer case "isLogginSuccess" should be trigered by calling another funcion inse your desired component.
edited Nov 21 '18 at 23:05
answered Nov 21 '18 at 22:50
Helmer BarcosHelmer Barcos
624310
624310
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
|
show 6 more comments
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
Didn't work unfortunately.
– PeeJee
Nov 21 '18 at 22:59
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
@PeeJee which version of redux have you installed? share a picture of the package.json file please
– Helmer Barcos
Nov 21 '18 at 23:02
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
package.json is in edit.
– PeeJee
Nov 21 '18 at 23:08
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
@PeeJee everythig looks good. could you please add the code from your index.js file and all other components like App.js and reducers.js ?
– Helmer Barcos
Nov 21 '18 at 23:11
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
aight! Made my changes.
– PeeJee
Nov 21 '18 at 23:17
|
show 6 more comments
It looks like you have the same issue as here.
TLDR: rename the folder you have called redux
to something else, wipe your node_modules
and reinstall and it should work.
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
add a comment |
It looks like you have the same issue as here.
TLDR: rename the folder you have called redux
to something else, wipe your node_modules
and reinstall and it should work.
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
add a comment |
It looks like you have the same issue as here.
TLDR: rename the folder you have called redux
to something else, wipe your node_modules
and reinstall and it should work.
It looks like you have the same issue as here.
TLDR: rename the folder you have called redux
to something else, wipe your node_modules
and reinstall and it should work.
edited Nov 21 '18 at 23:14
answered Nov 21 '18 at 22:53
ColinColin
4,4202829
4,4202829
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
add a comment |
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
Still no success :/
– PeeJee
Nov 21 '18 at 23:19
add a comment |
We looked at a lot of different things, but the problem was one with module resolution. import { combineReducers } from 'redux'
was not working, apparently because the project, itself, was given the name 'redux' in its package.json file and/or because a folder in the project's root was named 'redux'.
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
|
show 15 more comments
We looked at a lot of different things, but the problem was one with module resolution. import { combineReducers } from 'redux'
was not working, apparently because the project, itself, was given the name 'redux' in its package.json file and/or because a folder in the project's root was named 'redux'.
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
|
show 15 more comments
We looked at a lot of different things, but the problem was one with module resolution. import { combineReducers } from 'redux'
was not working, apparently because the project, itself, was given the name 'redux' in its package.json file and/or because a folder in the project's root was named 'redux'.
We looked at a lot of different things, but the problem was one with module resolution. import { combineReducers } from 'redux'
was not working, apparently because the project, itself, was given the name 'redux' in its package.json file and/or because a folder in the project's root was named 'redux'.
edited Nov 21 '18 at 23:44
answered Nov 21 '18 at 22:12
TexTex
1,6031627
1,6031627
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
|
show 15 more comments
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
I tried what you suggested but it didn't work :/
– PeeJee
Nov 21 '18 at 22:15
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
Are you getting the same error, or a different one?
– Tex
Nov 21 '18 at 22:22
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
The same one. the first time (after hot reloading) i get the error object.defineProperty called of non-object But when I refresh the emulator manually I get the same as before.
– PeeJee
Nov 21 '18 at 22:26
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
see additional suggestion in my edit.
– Tex
Nov 21 '18 at 22:33
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
Thanks for the edit but i still get the same message.
– PeeJee
Nov 21 '18 at 22:38
|
show 15 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420983%2freact-native-0-redux-combinereducers-is-not-a-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown