Skip to content

Commit

Permalink
Merge branch 'feat/use-motion-presence-hook' into feat/add-motion-to-…
Browse files Browse the repository at this point in the history
…drawer

* feat/use-motion-presence-hook:
  fix: wrong merge
  fix: remove ref from dependencies
  fix: generate new API documentation
  fix: revert changes to CODEOWNERS
  fix: remove duplicated code due to a merge conflict
  • Loading branch information
marcosmoura committed Aug 28, 2023
2 parents 8976c76 + 83ef7e1 commit f72cd9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ packages/react-components/react-jsx-runtime @microsoft/teams-prg
packages/react-components/react-toast @microsoft/teams-prg
packages/react-components/react-search-preview @microsoft/cxe-coastal
packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow
packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura
packages/react-components/react-nav-preview @microsoft/cxe-red @mltejera
packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura
# <%= NX-CODEOWNER-PLACEHOLDER %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type MotionState<Element extends HTMLElement = HTMLElement> = {
};

// @public (undocumented)
export type MotionType = 'unmounted' | 'entering' | 'entered' | 'idle' | 'exiting' | 'exited';
export type MotionType = 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';

// @public
export function useMotion<Element extends HTMLElement>(shorthand: MotionShorthand<Element>, options?: MotionOptions): MotionState<Element>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ function useMotionPresence<Element extends HTMLElement>(
active,
canRender: type !== 'unmounted',
}),
[active, ref, type],
// No need to add ref to the deps array as it is stable
// eslint-disable-next-line react-hooks/exhaustive-deps
[active, type],
);
}

Expand Down

0 comments on commit f72cd9c

Please sign in to comment.