There was an issue with the previous PR #242 where the updates would overwrite the existing images that are loaded due to stale data. This PR fixes that issue. Images are now loading asynchronously and updating correctly with current data.
Also fixed a warning that was related to the async callback functions updating the data state after the component(LessonHome) is unmounted. Added a ref hook to keep track of whether the component has unmounted so we could avoid updating an unmounted component.
Status:
:rocket: Ready
Description
There was an issue with the previous PR #242 where the updates would overwrite the existing images that are loaded due to stale data. This PR fixes that issue. Images are now loading asynchronously and updating correctly with current data.
Also fixed a warning that was related to the async callback functions updating the data state after the component(LessonHome) is unmounted. Added a ref hook to keep track of whether the component has unmounted so we could avoid updating an unmounted component.