Skip to content

Discuss Refactoring of API in Client #39590

@ShaunSHamilton

Description

@ShaunSHamilton

This comes about as I was going to refactor Certification.js to not rely on hardcoded values, but after discussing with Mrugesh and Oliver, realise it is not a quick section to fix.

Top sections to refactor:

  • ./redux Move from using both epics and sagas to just sagas.

What I have been looking into:

  • Certification.js (certMapSelector, and renderLegacyFullStack)
  • ShowCertification.js (imports certMap)
  • certAndProjectMap.js (Kris left a comment about refactoring to automatically generate from md/.json files)
  • getChallenges.js (Oliver mentioned splitting this up into more bite-sized functions to allow better access outwith)

Minutes:

  • Rather than moving away from Redux, it would be beneficial to leverage it without complex epics
  • Use Redux hooks, for refactor of functional components

  • certAndProjectMap.js is likely to be deleted
  • certMap and projectMap should be fetched with useStaticQuery when we build the client
  • Certification.js and ShowCertification.js could make use of a graphQL query to fetch the certMap

Feel free to edit this. @ojeytonwilliams and @raisedadead feel free to correct/add anything I missed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: apiServer application that needs familiarity with Express, Fastify, MongoDB etc.scope: tools/scriptsScripts for supporting dev work, generating config and build artifacts, etc.status: discussingUnder discussion threads. Closed as stale after 60 days of inactivity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions