pub struct NoObjectDepArrayRule { /* private fields */ }Expand description
Flags object or array literals inside useEffect/useMemo/useCallback
dependency arrays.
Object and array literals create new references on every render, defeating the purpose of the dependency array.
Implementations§
Source§impl NoObjectDepArrayRule
impl NoObjectDepArrayRule
pub fn new(config: &RuleConfig) -> Result<Self, RuleBuildError>
Trait Implementations§
Source§impl Rule for NoObjectDepArrayRule
impl Rule for NoObjectDepArrayRule
Auto Trait Implementations§
impl Freeze for NoObjectDepArrayRule
impl RefUnwindSafe for NoObjectDepArrayRule
impl Send for NoObjectDepArrayRule
impl Sync for NoObjectDepArrayRule
impl Unpin for NoObjectDepArrayRule
impl UnsafeUnpin for NoObjectDepArrayRule
impl UnwindSafe for NoObjectDepArrayRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more