-
Notifications
You must be signed in to change notification settings - Fork 65
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
Refactor HeaderSections #149
Comments
Hello!
My plan of attack: 4 different reducers in the reducers folder and then 4 different components within the HeaderSections.jsx file. Does this make sense? Actually I thought the original writer of the code wanted to just put it all together so that each of the sections could be iterated/mapped through. Am I right to say that you are requesting this change now because each of the header sections are getting more different from each other and should not be treated in the same way? |
I also think it makes sense to refactor it like that... this attempt at over generalization could be simplified simply by having 4 components - and if there are similarities between all of them, we can simply have all 4 extend another component. @bicep would you like to take this one after you handle the other task? |
Also take into consideration that for search results page we will need a page to return for each section. |
@TalAter @debragail Yeap let me give this one a shot. |
@bicep let me know when you're ready to tackle this and I can write the corresponding tests. |
Yep, will do! I may give it a shot this weekend. |
Hey guys - may I suggest writing any React components that does not use state as a functional component. This will be more pure without needing to go through additional lifecycles pass render. You can also destruct props and know what arguments you are using. Please correct me if I am interrupting the implementation wrong. One thing I saw on the Redux side is that reducers should not be passing in a hardcoded state. It should use the state declared for the store. If ever a property needs to be updated in the hardcoded state, this will override the update. |
Currently HeaderSection includes:
Last Block
RPC Server
Transactions
Mining Status
../src/reducers/headerSections.js
It might make sense to handle this container differently.
Expected Behavior
Current Behavior
The state for all 4 classes are handled as HeaderSections and it might be better to refactor this now.
Possible Solution
Handle HeaderSections as a header with individual components instead of together in headersections
Steps to Reproduce (for bugs)
Context
Trying to update the Xplore page to have results and be more modular in regards to state and clickable links.
Your Environment
The text was updated successfully, but these errors were encountered: