react-redux Questions
4
Solved
Hi I am new in react application. I want to set Public_URL in .env file .
.env file (I set my url link)
PUBLIC_URL="http://localhost:8000/api";
Login.tsx file
const response = await ...
Shareeshareholder asked 26/5, 2021 at 17:6
7
Solved
In my Redux store I have multiple slices and I would like to access the lang state of the settingsSlice inside the speciesSlice.
Here is a code sample of my slices:
const settingsSlice = createSlic...
Naamana asked 18/6, 2020 at 13:38
4
Solved
What is the proper way to chain queries if the 2nd query requires a parameter that is returned by the 1st?
const { data: user } = useGetUserQuery();
The user object contains an ID that is used to ...
Counterstamp asked 9/10, 2021 at 8:40
10
Solved
I am getting an error trying to install the react-redux package onto my create-react-app application. I have tried deleting and reinstalling my node_modules folder as well as installing it with adm...
Cliffcliffes asked 25/10, 2020 at 23:45
2
Solved
Let's assume I have an action that gets dispatched on page load, like say, in the index.js file.
example
store.dispatch(loadData());
in my reducer I initialize state to to an object. Something ...
Hephzibah asked 8/9, 2016 at 1:44
26
Solved
Unhandled Rejection (Error): Actions must be plain objects. Use custom middleware for async actions.
I wanted to add comments with every posts. So when fetch posts are run I want to call fetch ...
Scottyscotus asked 16/10, 2017 at 8:23
5
Solved
I am using next.js for frontend. I want to get user from localStorage, but as next.js is a server-side rendring, I can't get localStorage. What should I do so I can get localStorage?
import { creat...
Seraphim asked 21/4, 2023 at 7:16
4
Solved
I've got simple component to pick point on map and then display some GeoJSON data related to this point:
import React, { Component } from 'react';
import { Map, Marker, TileLayer, GeoJSON } from ...
Clop asked 24/5, 2017 at 10:12
5
I have React Component in componentDidMount fetch data from the server. The issue is componentDidMount called twice also the API called twice. I have a view increment API like youtube video views i...
Chariot asked 12/8, 2020 at 19:25
5
Solved
hellow , how to send params navigation go back ?
const Onsubmit = (data, details = null) => {
console.log(details.formatted_address);
route.params.onPlaceChosen(
route.params.id,
details.for...
Pincushion asked 2/9, 2020 at 16:47
7
I am new to react. I am using react select for the select.
Now, I have the following jsx
div className="col-md-4 d-flex align-items-center" style={borderClass}>
<label className="mb-0 font-...
Smelt asked 4/2, 2019 at 11:27
8
Solved
I have a React-Redux-KoaJs application with multiple components. I have few user roles as well. Now i want to display few buttons, tables and div to only specific roles and hide those from others. ...
Richardricharda asked 6/5, 2019 at 11:41
11
Solved
I'm getting this error on my index.tsx.
Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window'.
Here is my index.tsx code:
import * as React from 'react';
import * as Reac...
Kippy asked 14/10, 2018 at 8:31
2
Solved
I am new to React and am trying to learn by coding.
I need some help/advice with the code, with converting this Redux store to Redux Toolkit. Here I'm using a function called configureStore. What i...
Lorin asked 8/10, 2021 at 22:4
5
Solved
I'm trying to display images in a shopping cart i'm making but its not showing up. Do i have to import each image? I know my paths are fine because it worked before.I think there might be something...
Shaynashayne asked 26/7, 2017 at 18:30
13
Solved
Looking for a way to have material-ui's tooltip expand the text in a table cell ONLY if the text is cut off with an ellipsis (overflowing).
Currently in my table I have a cell like this:
<Tabl...
Nobility asked 13/6, 2019 at 21:12
6
I am looking at using the ES6 Map object to do my hashing for me, instead of creating a custom hashing function. However, it seems to me that it doesn't have much support for immutability, which is...
Rip asked 15/12, 2018 at 20:6
16
I am trying to switch an app I am building over to use Redux Toolkit, and have noticed this error coming up as soon as I switched over to configureStore from createStore:
A non-serializable value ...
Soche asked 9/5, 2020 at 22:47
26
Solved
I am creating a simple form to upload file using electron-react-boilerplate with redux form & material ui.
The problem is that I do not know how to create input file field because material ui ...
Pahlavi asked 14/11, 2016 at 12:54
2
I'm getting some images from the reddit API in my React/Redux and I thought about lazy loading them by setting their loading attributes to lazy.
But I'll get this message in DevTools:
[Interventio...
Ellenaellender asked 16/12, 2021 at 15:39
2
Solved
I have an autocomplete component that requires results from two separate APIs. Both APIs need to be called together with a debounced period since its an autocomplete. I am using react-redux, and re...
Patiencepatient asked 1/11, 2017 at 16:5
3
Solved
In redux-toolkit docs they suggest you to create the following definition to have proper types when you use useSelector hook:
export const useAppSelector: TypedUseSelectorHook<RootState> = us...
Edessa asked 18/4, 2021 at 6:50
13
@connect works great when I'm trying to access the store within a react component. But how should I access it in some other bit of code. For eg: let's say I want to use an authorization token for c...
Streaming asked 19/7, 2016 at 14:9
2
Solved
I'm trying to test a component that uses react-redux for state management.
To test quickly I want to mock useSelector, like this:
const templates = [
{
id: ...,
name: ...,
...
},
{
id: ...,
...
Redhanded asked 26/8, 2022 at 0:18
12
This is my first post on StackOverflow, so apologies if I'm not following the correct format.
I'm building my first app using tab navigator from React Navigation v 5.x and have run into a big probl...
Architectonics asked 27/2, 2020 at 18:0
© 2022 - 2025 — McMap. All rights reserved.