React+Redux - Uncaught Error: Expected the reducer to be a function

I tried simple react,redux,ajax working example and followed Reddit API tutorial, but I cannot create store and get error: Uncaught Error: Expected the reducer to be a...

Redux store does not have a valid reducer

Haven't been able to find anything around here regarding this error: "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are...

React Native jest keep throwing -TypeError: Component is not a function error

I am currently facing a problem while I am trying to add a simple unit test using jest. And it keeps throwing the TypeError:Component is not a function error and I cannot fix it. Anyone got the...

How to add multiple middleware to Redux?

I have one piece of middleware already plugged in, redux-thunk, and I'd like to add another, redux-logger. How do I configure it so my app uses both pieces of middleware? I tried passing in an...

Docker build image - glob error { Error: EPERM: operation not permitted, scandir

I'm attempting to build a Docker image of a React+TypeScript+NodeJS application built with Webpack 2.0, but I get the following error > [email protected] build / > webpack -p --config...

Hot Reload not working in react-native android

I tried it on windows 10 and Ubuntu 16.04. In both cases the Hot Reload only works with changes in jsx, but not, when I change a variabel or function or something else in javascript. The Hot...

html-webpack-plugin Entrypoint undefined = index.html

I'm trying to set a webpack4 and React boilerplate, but facing issue rendering the index.html. For example, when I updated the title of the index.html and the index.html in /dist folder is not...

Mock inner axios.create()

I'm using jest and axios-mock-adapter to test axios API calls in redux async action creators. I can't make them work when I'm using a axios instance that was created with axios.create() as...

"Unknown word" error showing after adding postcss-loader

I am trying to add postcss loader in my webpack but after adding postcss loader showing Unknown word error. I also attached error screenshot. please find attachment. Not sure what error is.... I...

yarn is having troubles with the network connection

I tried to install a package with yarn earlier today and I got this yarn install yarn install v1.9.4 [1/4] 🔍 Resolving packages... info There appears to be trouble with your network...

Webpack: TypeError: Cannot read property 'properties' of undefined

Here is the branch and repo in question: https://github.com/Futuratum/moon.holdings/tree/dev /Users/leongaban/projects/Futuratum/moon.holdings/node_modules/webpack-cli/bin/config-yargs.js:89 ...

When should I use Redux Saga instead of Redux Thunk, and when should I use Redux Thunk instead of Redux Saga?

The question is different from the past which is why. The question for this one is When. Since both are good frameworks by themselves the question is when should I use thunk than saga. Because one...

How to Debug White Screen Page (No Content Showing) in RN Expo App with No Error Prompts

I've been building an app in React Native Expo. First, I incorporated Facebook Login simply by copying and pasting the login async code into Login.js and added this.login() to componentWillMount....

Module not found: Can't resolve 'redux' in node_modules

When I used typescript to create my react project, I introduced Redux error reporting, which indicated that I could not find it, but I had to install all the dependencies. Here's my...

React require("history").createBrowserHistory` instead of `require("history/createBrowserHistory")

So basically i am having a problem in using the history library in react. Is it because of the latest version should i try to downgrade the history version but as the error states that Support for...

PersistGate causes the app to stop rendering

I am in the process of configuring a React Native app with Redux store and PersistGate. The Redux store is configured and working as expected, but the PersistGate is causing the app to stop...

Redux-persist is not working: Page refresh clears the state

To persist the state when the page is refreshed, I am trying to integrate redux-persist. However, it is not working. Page refresh clears the state. Here is how _persist object int the state...

React components not rendering on Heroku

Created a react rails app using react-rails gem but when uploaded on heroku the react components are all missing. It works fine on my local server though. Here's the package.json file in case i...

How to use Redux-Thunk with Redux Toolkit's createSlice?

==================== TLDR ========================== @markerikson (see accepted answer) kindly pointed towards a current solution and a future solution. EDIT: 15th Nov 2020: Link to Docs to use...

npm start errors with ERR! code ENOENT, syscall open

I'm suddently having a problem with "npm start" in my React application. When I trigger it, this is what I receive: npm ERR! code ENOENT npm ERR! syscall open npm ERR! path...

reactRedux.useDispatch is not a function

I am trying to use react-redux hooks, however I get the error: TypeError: (0 , _reactRedux.useDispatch) is not a function Any ideas? ... import { useDispatch, useSelector } from...

Built electron app with react frontend and express proxy backend not directing api requests to express

I am building an Electron application from Create-React-App and an proxy express server to handle data and backend logic. (Reason for this is I want to separate electron specific api calls with...

React - TypeError: baseReducer is not a function

im making a SPA using React. I want the states persits after page refresh so i used 'redux-persist'. I dont know if my import 'allReducers' is wrong because the message i recived is TypeError:...

Testing useSubscription apollo hooks with react

Testing the useSubscription hook I'm finding a bit difficult, since the method is omitted/not documented on the Apollo docs (at time of writing). Presumably, it should be mocked using the...

Redux State Problem : TypeError: undefined is not an object

I am new to react native and redux especialy and I got an error message that I really struggle to deal with. This is the error im getting TypeError: undefined is not an object (evaluating...

(React and Redux) Problem with adding items to the shopping cart

I am following a tutorial, where we are building a shopping cart, which is still unfinished, but I would like to solve this problem before continuing in the tutorial. The thing is, that when I try...

Nextjs - await store.dispatch Cannot read property 'dispatch' of undefined

I'm new to React, Redux and have been following tutorials on the topic. I'm come across a lot of issues that I've been able to resolve but I've come across an issue I can't resolve. I set up...

How to use Redux devtools with Nextjs?

I'm trying to use the Redux DevTools extension on my Next.js application. The redux is working fine but I'm not being able to see the state in the devtools. What am I doing wrong and how can I fix...

react-router-dom useHistory() not working

The useHistory() hook is not working in my project. I have it in different components but none of them work. I am using "react-router-dom": "^5.2.0", import {useHistory} from...

How to use "next-redux-wrapper" with "Next.js", "Redux-ToolKit" and Typescript properly?

I'm using RTK (redux-toolkit) inside a Next.js App. And I'm trying to dispatch an AsyncThunk Action inside "getInitialProps". When searching I found a package called "next-redux-wrapper" that...