pub enum EffectMode {
None,
Hook,
Component,
}
Expand description
How to run effects in components.
Variants§
None
No effects at all.
Hook
As a direct useEffect
hook in the component’s body.
Component
Rendering an useEffect
hook instead. Good for testing React Server Components, as they can’t
use useEffect
hooks directly.
Trait Implementations§
Source§impl Clone for EffectMode
impl Clone for EffectMode
Source§fn clone(&self) -> EffectMode
fn clone(&self) -> EffectMode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EffectMode
impl Debug for EffectMode
Source§impl Default for EffectMode
impl Default for EffectMode
Source§fn default() -> EffectMode
fn default() -> EffectMode
Returns the “default value” for a type. Read more
Source§impl FromStr for EffectMode
impl FromStr for EffectMode
Source§impl PartialEq for EffectMode
impl PartialEq for EffectMode
impl Copy for EffectMode
impl Eq for EffectMode
impl StructuralPartialEq for EffectMode
Auto Trait Implementations§
impl Freeze for EffectMode
impl RefUnwindSafe for EffectMode
impl Send for EffectMode
impl Sync for EffectMode
impl Unpin for EffectMode
impl UnwindSafe for EffectMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.