WikiEduDashboard
WikiEduDashboard copied to clipboard
Refactor: Migrated timeline.jsx from Class Based Components to Functional Components.
What this PR does
This pull request refactors the Timeline component from a class-based component to a functional component using React hooks. The key issues it addresses are:
- Modernizing the Code: Updates the component to use modern React practices, improving readability and maintainability.
- Performance Improvement: Implements useCallback with throttling for the scroll event handler to enhance performance.
- State Management: Simplifies state management by using useState.
These changes result in cleaner, more efficient, and easier-to-maintain code, while aligning with current React standards.
Open questions and concerns
This is my first time contributing to the Wiki Education Foundation. Refactoring has improved my understanding of code organization. If you find any errors or poor coding practices, please let me know and provide feedback.
This is too complex of a file for me to feel comfortable with directly converting it to a functional component, and probably also larger than what you should attempt for a first PR. For this file in particular, I think we need to do some refactoring first to extract small components.