mirror of https://github.com/alibaba/ice.git
* feat: add changesets config * chore: remove version publish scripts * chore: update ci workflow * chore: update checkout branch step * chore: lock * fix: lost scripts * fix: ts type error * chore: remove scripts * chore: update README * chore: update lock * chore: update dependency and script * chore: remove version check * chore: add publishConfig to package.json * chore: update ci step * chore: update release:beta script * chore: add private field to examples * chore: remove registry * chore: update lock * chore: update ci workflow * chore: update workflow * chore: update README * chore: update changeset README * chore: update cache key * feat: update cache * chore: update cache config |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| CHANGELOG.md | ||
| README.md | ||
| package.json | ||
| tsconfig.json | ||
README.md
@ice/appear
React component for supporting appear and disappear events.
Usage
npm i @ice/appear -S
import VisibilityChange from '@ice/appear';
export default function Home() {
return (
<VisibilityChange
onAppear={() => {
console.log('Something has been shown.')
}}
onDisappear={() => {
console.log('Something has disappeard.')
}}
>
Anything you want to show.
</VisibilityChange>
);
}