pub struct NoNestedComponentsRule { /* private fields */ }Expand description
Flags React component definitions that appear inside another component.
Nested component definitions cause the inner component to be re-created on every render of the outer component, destroying and remounting its DOM and losing all state.
Implementations§
Source§impl NoNestedComponentsRule
impl NoNestedComponentsRule
pub fn new(config: &RuleConfig) -> Result<Self, RuleBuildError>
Trait Implementations§
Source§impl Rule for NoNestedComponentsRule
impl Rule for NoNestedComponentsRule
Auto Trait Implementations§
impl Freeze for NoNestedComponentsRule
impl RefUnwindSafe for NoNestedComponentsRule
impl Send for NoNestedComponentsRule
impl Sync for NoNestedComponentsRule
impl Unpin for NoNestedComponentsRule
impl UnsafeUnpin for NoNestedComponentsRule
impl UnwindSafe for NoNestedComponentsRule
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