isDeepRef
Overview
Section titled “Overview”The isDeepRef
function determines whether a given value is a deep ref object, indicating that it has been deeply converted into a ref object using the ref
function.
Checking for Deep Ref
Section titled “Checking for Deep Ref”To check if a value is a deep ref, you can use the isDeepRef
function.
import { isDeepRef } from 'regor'
const myValue = /* Your value here */
if (isDeepRef(myValue)) { console.log('The value is a deep ref.')} else { console.log('The value is not a deep ref.')}
Parameters
Section titled “Parameters”value
: The value you want to check for being a deep ref object.
Return Value
Section titled “Return Value”- The
isDeepRef
function returnstrue
if the providedvalue
is a deep ref object, andfalse
otherwise.
Example
Section titled “Example”import { isDeepRef } from 'regor'
const deepRefValue = /* A deep ref value created using the ref function */
if (isDeepRef(deepRefValue)) { console.log('This value is a deep ref object.')} else { console.log('This value is not a deep ref object.')}