-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[TreeView] Remove state.items.itemTree
#12717
Conversation
id, | ||
children, | ||
}: TreeViewItemIdAndChildren): ReturnType<typeof instance.getItemsToRender>[number] => { | ||
const getItemsToRender = React.useCallback(() => { |
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.
The useCallback
was not needed since we call this function on every render
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.
but you added it anyways? Am I misunderstanding something? 🤯
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.
I read the change backward, fixed 😬
Deploy preview: https://deploy-preview-12717--material-ui-x.netlify.app/ |
state.items.itemTree
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
LGTM 🎉
While working on #12213, I noticed that
itemTree
was now totally redundant withorderedItemChildren
.