python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Cannot spyOn on a primitive value; undefined given - Testing a function execution in onChange in connected component
New to testing and This is a connected component using redux. I am testing if the maskPromoCode function is called. With the current test code, the error says: Cannot spyOn on a primitive value; undef...
DollyBeeBee
Votes: 0
Answers: 1
How to pass url to reducer in a correct way?
I have created my first slice:
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
import axios from 'axios';
const initialState = {
current: null,
value: [],
status: 'idle'...
Pepe
Votes: 0
Answers: 1
Routing with react-router-dom, redux, apollo-client, connected-react-router and redux-persist
I am trying to configure an application and I am using: react class components, redux, react-redux, apollo-client, redux-persist and connected-react-redux and I am receiving the following error: "...
Prgrmist
Votes: 0
Answers: 1
Redux store.getState() returning initial state values
I have a Redux store configured and I'm trying to access the state from outside of a React component. I'm using store.getState() but it's returning the initial state values for everything in the store...
Blake
Votes: 0
Answers: 2