score:0

Accepted answer

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);

Related Query

More Query from same tag