mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
avoid lambda props
This fixes the simple cases of callback props using lambda functions. This will prevent rerendering in some cases since a new callback function is not created on each call.
This commit is contained in:
@@ -92,7 +92,7 @@ const SettingsDrawer: React.FunctionComponent<SettingsProps> = (props) => {
|
||||
icon="cog"
|
||||
size={Drawer.SIZE_SMALL}
|
||||
title={i18n.translate(SettingsStringId.Title)}
|
||||
onClose={() => props.onClose()}
|
||||
onClose={props.onClose}
|
||||
>
|
||||
<div className={Classes.DRAWER_BODY}>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
|
||||
Reference in New Issue
Block a user