Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • M membership.eclipse.org
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 3
    • Merge requests 3
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse FoundationEclipse Foundation
  • IT
  • Websites
  • membership.eclipse.org
  • Issues
  • #430
Closed
Open
Issue created Dec 14, 2021 by Zhou Fang@zhoufang

Reduce API call times by moving component state to React Context

Currently, most state/data are saved in corresponding components to display related stuff. And with this structure, when we navigate between pages, the whole page will be re-rendered and all API calls will be done again to get the data and save into state.

There is also another small side effect, a React warning for updating unmounted component will be raised when we navigate to another page before all API call finish.

After we move the state into Context, the pages will be re-rendered when we come back and forth, but the state in Context will remain the same as it's in a higher level which won't be re-rendered based on page change. And this can also solve the side effect mentioned above.

Edited Dec 14, 2021 by Zhou Fang
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent