This project is a custom hook for React that uses the IntersectionObserver API to observe a DOM element.
classical useIntersection hook with useEffect and useRef
same as useIntersection but with avoiding the need to use useEffect and useRef, allows intersection on optional or delayed elements
- Node.js
- pnpm
pnpm ipnpm testpnpm buildTo create a new release, it is necessary to set and push a (Git)Tag like:
git tag v1.2.3 && git push origin tag v1.2.3What is crucial here is that the tag begins with a lowercase v followed by a Semantic Versioning -
a tag will then look like this: v1.2.3.
From this, a GitHub Action then creates a tar file with the name by this pattern:
${NAME_OF_THIS_PROJECT}-${SEMANTIC_VERSIONING_OF_TAG}.tar.gz
// Output: useintersection-1.2.3.tar.gz
Which tar file can be used as a dependency in other projects. To do this, this tar file must be downloaded and can then be used installed in another project like this:
pnpm install ../../my-location/useintersection-1.2.3.tar.gz- React - The web framework used
- TypeScript - The language used