-
Notifications
You must be signed in to change notification settings - Fork 0
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
PADV-926 change manage store to reduxin main and instructors pages #26
Conversation
@@ -1,40 +1,20 @@ | |||
import React, { useState, useReducer, useEffect } from 'react'; | |||
import React, { useState, useEffect } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using this right now, Am I correct? Please add an inline comment showing that this module will change. @AuraAlba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -5,7 +5,7 @@ import { | |||
UPDATE_CURRENT_PAGE, | |||
} from 'features/Students/actionTypes'; | |||
import { RequestStatus } from 'features/constants'; | |||
import reducer from 'features/Instructors/InstructorsPage/reducer'; | |||
import reducer from 'features/Students/StudentsPage/reducer'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? @AuraAlba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was using the incorrect reducer, was the same definition and didn't give error so for the moment I import the correct reducer but that will be removed in the other ticket
@@ -34,7 +34,7 @@ const initialState = { | |||
}; | |||
|
|||
const StudentsFilters = ({ resetPagination, fetchData, setFilters }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we will move this component to redux. Is that correct? @AuraAlba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in the other ticket the student and courses pages will be moved to redux
@@ -0,0 +1,36 @@ | |||
/* eslint-disable no-param-reassign */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it necessary? @AuraAlba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eslint give this error because the reducer modify directly the property of the state, the good practice is make copy of the object and modify it but redux improve that so we can use it, only with reducer of redux
Ticket
https://agile-jira.pearson.com/browse/PADV-926
Description
Manage unique state with redux to shared state between components
Changes made
Define redux actions and reducer for instructors and main
Import redux store in other pages
Add and update tests
How to test
Clone the Institution Portal MFE
Run npm install.
Run npm run start
Go to http://localhost:1980/