Wizard: Add eslint-disable to useEffect
This disables `react-hooks/exhaustive-deps` rule for dependency arrays that should run only once on mount and therefore need to stay empty.
This commit is contained in:
parent
03e0061fc6
commit
a3abc29f51
2 changed files with 6 additions and 0 deletions
|
|
@ -40,6 +40,9 @@ const DetailsStep = () => {
|
|||
)
|
||||
);
|
||||
}
|
||||
// This useEffect hook should run *only* on mount and therefore has an empty
|
||||
// dependency array. eslint's exhaustive-deps rule does not support this use.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
const handleNameChange = (
|
||||
_event: React.FormEvent<HTMLInputElement>,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ const OscapStep = () => {
|
|||
const release = useAppSelector(selectDistribution);
|
||||
useEffect(() => {
|
||||
prefetchOscapProfile({ distribution: release });
|
||||
// This useEffect hook should run *only* on mount and therefore has an empty
|
||||
// dependency array. eslint's exhaustive-deps rule does not support this use.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue