Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate class components to functional components #106

Open
jho406 opened this issue Oct 9, 2024 · 0 comments
Open

Migrate class components to functional components #106

jho406 opened this issue Oct 9, 2024 · 0 comments

Comments

@jho406
Copy link
Collaborator

jho406 commented Oct 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

1 participant