superglue icon indicating copy to clipboard operation
superglue copied to clipboard

Migrate class components to functional components

Open jho406 opened this issue 1 year ago • 0 comments

The Nav component is an older class based component that has an internal state that looks like this:

    this.state = {
      pageKey: initialPageKey,
      ownProps: {},
    }

It does seem superfluous to the superglue state which has a currentPageKey. I think we can safely refactor and convert the nav component to a functional one and maybe even move navigateTo outside the component that can be imported on demand instead of injecting into each page component.

Thinking about navigateTo a bit more, as it exists today, it also prevents a refactor of visit and remote in #107

jho406 avatar Oct 09 '24 08:10 jho406