weareinreach / InReach

Avoid .bind() or local functions in JSX properties JS-0417
Performance
Major
10 occurrences in this check
JSX props should not use arrow functions
373					<Button
374						variant='primary'
375						className={classes.resultsBtn}
376						onClick={() => setOpened(false)}377						loading={isFetching}
378					>
379						{t('view-x-result', { count: resultCount })}
JSX props should not use arrow functions
375					</Group>
376				</Modal>
377
378				<Box ref={ref} component={DefaultLauncher} onClick={() => setOpened(true)} {...props} />379			</>
380		)
381	}
JSX props should not use arrow functions
375					</Group>
376				</Modal>
377
378				<Box ref={ref} component={DefaultLauncher} onClick={() => setOpened(true)} {...props} />379			</>
380		)
381	}
JSX props should not use arrow functions
367						<Button
368							variant='primary'
369							className={classes.resultsBtn}
370							onClick={() => setOpened(false)}371							loading={isFetching}
372						>
373							{t('view-x-result', { count: resultCount })}
JSX props should not use arrow functions
358					<Group className={modalClasses.footer} noWrap>
359						<Button
360							variant='secondary'
361							onClick={() => deselectAll()}362							disabled={selectedItems.length < 1}
363							className={classes.uncheckBtn}
364						>
JSX props should not use arrow functions
334			<>
335				<Modal
336					opened={opened}
337					onClose={() => setOpened(false)}338					title={<TitleBar modalTitle />}
339					fullScreen={isMobile}
340					classNames={modalClasses}
JSX props should not use arrow functions
310					{modalTitle ? (
311						<Text
312							fw={500}
313							onClick={() => deselectAll()}314							className={selectedItems.length > 0 ? classes.uncheck : classes.uncheckDisabled}
315						>
316							{t('uncheck-all')}
JSX props should not use arrow functions
33	return (
34		<Group position='apart' align='center' noWrap>
35			<Box maw='70%' style={{ overflow: 'hidden' }}>
36				<Breadcrumb onClick={() => closeAllModals()} {...breadcrumb} />37			</Box>
38			{rightSection}
39		</Group>
JSX props should not use arrow functions
179				<Loader size={32} mr={16} />
180			</Group>
181		) : form.values.search.length > 0 ? (
182			<Group spacing={4} noWrap className={classes.rightIcon} onClick={() => form.reset()}>183				<Text>{t('clear')}</Text>
184				<Icon icon='carbon:close' />
185			</Group>
JSX props should not use arrow functions
113			classNames={{ root: classes.root, icon: classes.icon }}
114			px={`calc(${theme.spacing.sm} - ${rem(2)})`}
115			py={theme.spacing.xs}
116			onClick={clickHandler}117			leftIcon={<Icon icon={iconRender} height={24} color={theme.other.colors.secondary.black} />}
118		>
119			<Text size='md' fw={theme.other.fontWeight.semibold} truncate>