score:0
ok, my store name was wrong because i've npx created it with redux template and haven't changed store name from counter to user.
import { configurestore } from '@reduxjs/toolkit';
import userreducer from '../features/userslice';
export const store = configurestore({
reducer: {
user: userreducer,
},
});
it all works now.
score:0
your screenshot only includes the render
part and the problem might not be render
, i think. it must be related to the logic. for example, you might defined user
as a state
and use it.
to get help, i think you should check the part and show them, too.
score:0
well, not really sure about this. i think the problem is here.
export const selectuser = (state) => state.user;
according to official document you need to use createselector
.
so it should try like this.
export const selectuser = createselector(
(state) => state.user
)
...
const user = useselector(selectuser);
Source: stackoverflow.com
Related Query
- Redux variable considered null yet appears in console
- Why my redux state is null but in console everything is working
- Async variable appearing empty in conditional logic, yet it is present in console logs
- Why my action result data is null when I try console the state using redux and react js
- is it considered good practice to pass callBacks to redux async action?
- AWS GraphQL: Variable 'input' has coerced Null value for NonNull type 'Input!'
- How to get content of Redux store in console without devtools?
- Rendering an environment variable to the browser in a react.js redux production build running in different environments
- Cannot convert undefined or null to object redux
- Should I initialize a null state variable in a React component?
- Redux Form, Radio Button Fields, how to support variable values?
- Why is this variable from the Redux store not in the `this.props` on React page?
- unknown props message in console while using redux form
- Redux save store as global variable on React app
- How to handle multiple api request,to show loading indicator from one variable in redux store
- Typescript - Setting the type for a null property, when defining the initial state in Redux
- Getting null object on console for the first run in reactjs
- export multiple variable in one reducer file REDUX
- Can I store a ref in Redux store, or is it considered bad practice?
- Getting rid of console logs in redux wrapper with Next.js
- How can I memoize a variable derived from redux useSelector?
- React Redux "Cannot read property 'status' of undefined" error when trying to access store variable
- How to update redux state using a react variable passed up to the component from a child
- React Redux - how to load details if the array is not yet obtained?
- Getting Error: console is not defined in redux
- Exported variable 'store' has or is using name '$CombinedState' from external module error Redux toolkit and redux persist
- Redux reducer not showing my console log and returning undefined
- Access redux store with variable value in name
- React / Redux - Getting variable to update properly on change of global state
- React Redux state array variable pass as prop to child component, either infinite loop or empty array
More Query from same tag
- React Bootstrap CSS: I want my Container element to fill more of the entire page horizontally
- what is causing borders to appear in my modal?
- How do I add the ability to edit text within a react component?
- How to reset useState everytime I change my page?
- React: Send post request to server using the data with the state updated in useEffect
- React App, struggling to create an independent handleToggle
- how to combine the objective arrays have the save same key in javascript
- How can I upload multiple images in firebase v9 cloud storage using reactjs
- how to check type in typescript. instance of not working
- Sending data to and getting data from node.js?
- Infinite calendar remove selection handler
- Getting Error message: Unexpected Token
- React Parent component calculating width and height of Child Component
- How to use multiple CSS classes in React.js?
- React Router not working for my components
- How does prototypal inheritance in JavaScript really works?
- require is working jsx file but url() resolve is not wroking in sass file - webpack
- React Formik JSON to YAML, then back to JSON on Submit
- Material-ui Override StepLabel nested property
- Redux Toolkit: state showing as Proxy / undefined within reducer
- How to update navbar in react
- How to fix the Argument of type 'Date[]' is not assignable to parameter of type '(prevState: undefined) in react
- Use multiple web.config files for qa, dev and prod in a REACTJs project
- react-redux-form Radio Field not updating checked prop
- How to render one array item based on name props in React
- Why does the child component have more props than the parent?
- flex not wokring in html css
- Spread operator to update array of objects
- Why CSS loader of webpack not working?
- Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application