-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Site Migration: Add a documentation for the useFlowNavigator hook #94591
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
41c6bb7
to
4f68183
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
@@ -8,14 +8,52 @@ interface Options { | |||
persistedUrlParams: string[]; | |||
} | |||
|
|||
/** | |||
* Custom hook for managing navigation within a flow, handling query parameters and step transitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using typescript, we don't need to describe the type; you can just explain what the prop does directly over the property definition, like this example. The reason of this approach is we will have the best of both worlds, the type checking and the editor describing the type and our comment describing the intent.
The same idea is applicable to the return type, we can have another interface just describing the output.
The same for the return, we can have another interface describing the type.
Thanks for the feedback and contribution. I just left a suggestion regarding the format. |
@gabrielcaires, I removed the type from the hook parameters. However, I left it for the functions provided by the hook. I also left the return types. Let me know what you think about it. |
Related to #
Proposed Changes
Why are these changes being made?
Testing Instructions
Pre-merge Checklist