Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dear diary - insaf #290

Open
wants to merge 4 commits into
base: Insaf
Choose a base branch
from
Open

Dear diary - insaf #290

wants to merge 4 commits into from

Conversation

ahmedinshaf
Copy link

No description provided.

@ahmedinshaf ahmedinshaf marked this pull request as draft September 9, 2023 04:25
@ahmedinshaf ahmedinshaf marked this pull request as ready for review September 9, 2023 04:25
Comment on lines +16 to +26
export default function reducer(state = initialState, action: Action) {
switch (action.type) {
case SET_USER_NAME:
return {
...state,
userName: action.payload,
};
default:
return state;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is old way of defining reducers. In the redux toolkit, reducers are defined as slices, and the way actions are defined is different. Please go through the documentation of redux toolkit and refactor your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants