Adds a context to store the user's current team's information.
Updates the user context to reduce rerendering
Updates Episode context to contain full episode information instead of just the id, and adds EpisodeProvider, which encapsulates the logic for loading the full episode information.
Note that there are two hooks to get episode data: useEpisode and useEpisodeId. useEpisode contains full episode data, and useEpisodeId contains the episodeId and a fucntion to set the episode id. I set it up this way to avoid rerenders.
components that only require episodeId will not rerender when the full episode data is loaded. ( I documented this in the code as well)
Adds a context to store the user's current team's information.
Updates the user context to reduce rerendering
Updates Episode context to contain full episode information instead of just the id, and adds EpisodeProvider, which encapsulates the logic for loading the full episode information.
useEpisode
anduseEpisodeId
.useEpisode
contains full episode data, anduseEpisodeId
contains the episodeId and a fucntion to set the episode id. I set it up this way to avoid rerenders.