Skip to content
On this page

or

Category
Last Changed
3 months ago

OR conditions for refs.

Usage

import { or } from '@vueuse/core'

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

whenever(or(a, b), () => {
  console.log('either a or b is truthy!')
})
import { or } from '@vueuse/core'

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

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

Type Declarations

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

Source

SourceDocs

Contributors

Anthony Fu
Vinicius Kiatkoski Neves
Alex Kozack

Changelog

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