openedx / openedx/frontend-app-authoring
Use React Query for editor data loading
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 218
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 20
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/editors/data/redux/requests/reducer.js and review the listed loaders and mutations. Compare the existing apiHooks.ts patterns elsewhere in the Authoring MFE before tracing each editor request. Done means all listed REST interactions use React Query instead of Redux state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100