0.1.11 • Published 2 years ago

react-native-contains v0.1.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-contains

Universal element contains for react, react-native, and react-native web

Example 1

import { useRef } from "react",
import { View } from "react-native",
import contains from "react-native-contains";

function Component() {
  const ref = useRef();
  return (
    <View>
      <View ref={ref}>
        <View onPress={((event) => {
          contains(ref.current, event.target); // true
        })}/>
      </View>
      <View onPress={((event) => {
        contains(ref.current, event.target); // false
      })}/>
    </View>
  )
}

Documentation

API Docs

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago