why using React.useMemo with modalProps #24686
Unanswered
alexzhou-chata
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
const modalProps = React.useMemo( () => ({ styles: modalPropsStyles, isModeless: true, dragOptions: isDraggable ? dragOptions : undefined, }), [isDraggable], );
This was copied from the Fluent UI react Dialog
Why the useMemo being used here?
I know it can solve the performance issue, but why with this specific props?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions