Skip to content

Use React Query for editor data loading #2542

@bradenmacdonald

Description

@bradenmacdonald

Anytime the editors in src/editors need to load data, or interact with a REST API in any way, they should do so using React Query.

Move the various GET/POST requests out of the Redux state and into React Query apiHooks.ts files, following the same patterns used elsewhere in the Authoring MFE codebase.

A list of all the loaders/mutations is here:

  • fetchUnit
  • fetchBlock
  • fetchStudioView
  • createBlock
  • saveBlock
  • uploadAsset
  • allowThumbnailUpload
  • uploadThumbnail
  • uploadTranscript
  • deleteTranscript
  • fetchCourseDetails
  • fetchImages
  • fetchVideos
  • uploadVideo
  • checkTranscriptsForImport
  • importTranscript
  • fetchVideoFeatures
  • fetchAdvancedSettings

Metadata

Metadata

Assignees

No one assigned

    Labels

    code healthProactive technical investment via refactorings, removals, etc.help wantedReady to be picked up by anyone in the community

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions