Packages

t

react

MutableRef

trait MutableRef[T] extends Object

For use with useRef() hook which is slightly different than the mutable Ref. current is designed to be set directly or can be used on the ref attribute for a component. Since you can provide an initial value, if you want null to be valid, either use null directly or model it explicitly as T|Null to force client's to deal with the explict null value (otherwise they need to check for the null value directly).

Annotations
@JSType()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MutableRef
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val current: T

Concrete Value Members

  1. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  2. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  3. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  4. def toLocaleString(): String
    Definition Classes
    Object
  5. def valueOf(): Any
    Definition Classes
    Object