Skip to content

Commit 4db27b3

Browse files
docs(onRetain): clarify wording
Closes ui-router/ui-router.github.io#11
1 parent 2b0e48b commit 4db27b3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/transition/interface.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,11 @@ export interface IHookRegistry {
512512
* Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.
513513
*
514514
* Registers a lifecycle hook, which is invoked (during a transition) for
515-
* a specific state that was previously active and is not being entered nor exited.
515+
* a specific state that was previously active will remain active (is not being entered nor exited).
516516
*
517-
* Since this hook is invoked when a transition is when the state is kept, it means the transition
518-
* is coming *from* a substate of the kept state *to* a substate of the kept state.
519-
* This hook can be used to perform actions when the user moves from one substate to another, such as
520-
* between steps in a wizard.
517+
* This hook is invoked when a state is "retained" or "kept".
518+
* It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.
519+
* This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.
521520
*
522521
* The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.
523522
* `onRetain` hooks generally specify `{ retained: 'somestate' }`.

0 commit comments

Comments
 (0)