Skip to content

Convert RepoContainer to function component

Created by: lguychard

Necessary to allow us to use useBreadcrumbs() from <RepoContainer>. It also makes the component quite a bit simpler 😅

The refactor works well in my manual testing, with the exception of the following warning:

Warning: Cannot update a component from inside the function body of a different component.
    in RepoHeader (created by RepoContainer)
    in div (created by RepoContainer)
    in RepoContainer (created by Context.Consumer)

This is due to <RepoHeader/> calling onLifecyclePropsChange() immediately in its constructor. I think we should change that store pattern too...

Merge request reports

Loading