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

Convert Nav and ApplicationBase to functional components #112

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

jho406
Copy link
Collaborator

@jho406 jho406 commented Oct 13, 2024

This PR is fairly long, but it converts the two components into its functional counterpart.

With the Nav we converted to Navigationthat exports a NavigationProvider component and a NavigationContext, the latter is handy if we wanted to access visit, remote, pageKey, and navigateTo to help users build a custom <Link> component or if they want to use the functions without passing it from parent to child.

With Application, we removed ApplicationBase. In doing so, we've simplified the component to the point that if someone wanted fine grain control of building the redux Provider or Navigation, they can just refer to the source code and build their own using the same helper methods in lib/index.ts.

We also updated the docs.

@jho406 jho406 force-pushed the hooks-usepage branch 3 times, most recently from 657ce23 to 9fc633a Compare October 14, 2024 07:13
@jho406 jho406 force-pushed the migrate-to-functional-components branch 2 times, most recently from 82356b5 to c2d2a5e Compare October 14, 2024 07:51
@jho406 jho406 changed the base branch from hooks-usepage to main October 19, 2024 06:30
This PR is fairly long, but it converts the two components into its functional
counterpart.

With the `Nav` we converted to `Navigation`that exports a `NavigationProvider`
component and a `NavigationContext`, the latter is handy if we wanted to
access visit, remote, pageKey, and navigateTo to help users build a custom
`<Link>` component or if they want to use the functions without passing it
from parent to child.

With `Application`, we removed `ApplicationBase`. In doing so, we've simplified
the component to the point that if someone wanted fine grain control of building
the redux `Provider` or `Navigation`, they can just refer to the source code and
build their own using the same helper methods in `lib/index.ts`.

We also updated the docs.
@jho406 jho406 force-pushed the migrate-to-functional-components branch from c2d2a5e to 85e50f9 Compare October 19, 2024 06:32
@jho406 jho406 merged commit b54cde2 into main Oct 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant