Skip to content
GitLab
Projects Groups 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
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 20
    • Issues 20
    • 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
  • Merge requests
  • !107

Improved the useEffect usage

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Zhou Fang requested to merge github/fork/linkfang/zhoufang/master/issue93 into master Jun 14, 2021
  • Overview 25
  • Commits 10
  • Changes 11

For issue93

  • Added all dependencies suggested by ESLint.

  • Instead of using useEffect in CompanyInformationContacts component, now it's using onChange (of some input components) to handle the logic

Update on June 18: Overall, less API calls and less dependencies and if statement conditions in useEffect. Won't unnecessarily trigger useEffect.

  • Removed furthestpage from the dependency array by changing the way to get the field id when user chooses "Start New Application". Instead of getting the field id by doing a GET request, now the field id will be updated after a successful POST request.

  • Removed formik from the dependency array by using destructuring to get only the setFieldValue method.

  • Removed useEffect in SigningAuthority component, as the update/operation will be triggered when we get the data in CompanyInfo component.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/linkfang/zhoufang/master/issue93

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