-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Nav and ApplicationBase to functional components
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.
- Loading branch information
Showing
15 changed files
with
685 additions
and
576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 80 | ||
"printWidth": 80, | ||
"useTabs": false, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.