Skip to content
Advertisement

Tag: react-native

Why is my setState not working when passed as an argument to a function?

For the function fetchApiAndSetStateForWrongGuesses() I pass it two parameters called randNum and wrongGuess. randNum is just a number but wrongGuess is supposed to be a state. The problem is that when I pass wrongGuess to the function fetchApiAndSetStateForWrongGuesses() the setState doesn’t works. By the time it hits the console.log it just prints out an empty string because thats what the

TypeError: store.getState is not a function. (In ‘store.getState()’, ‘store.getState’ is undefined how can i resolve this problem?

i want to cnnect redux-saga witdh react-native but this error keep happen… TypeError: store.getState is not a function. (In ‘store.getState()’, ‘store.getState’ is undefined Warning: Failed prop type: Invalid prop store of type function supplied to Provider, expected object this is my code (App.js) (src/index.js) (store/cofigurestore.js) (reducer/index.js) (sage/index.js) please help me ……… i want to resolve this problem…… but i don’t

Advertisement