Skip to content
On this page

and

Category
Last Changed
3 months ago

AND condition for refs.

Usage

import { and } from '@vueuse/core'

const a = ref(true)
const b = ref(false)

whenever(and(a, b), () => {
  console.log('both a and b are now truthy!')
})
import { and } from '@vueuse/core'

const a = ref(true)
const b = ref(false)

whenever(and(a, b), () => {
  console.log('both a and b are now truthy!')
})
  • or
  • not
  • whenever

Type Declarations

/**
 * `AND` conditions for refs.
 *
 * @see https://vueuse.org/and
 */
export declare function and(...args: MaybeRef<any>[]): ComputedRef<boolean>
/**
 * `AND` conditions for refs.
 *
 * @see https://vueuse.org/and
 */
export declare function and(...args: MaybeRef<any>[]): ComputedRef<boolean>

Source

SourceDocs

Contributors

Anthony Fu
Alex Kozack

Changelog

v4.8.3 on 4/20/2021
0f7a9 - feat(and,or,not): new functions (#459)
and has loaded