Comments (1)
Well a bit unusual use case but I suppose you could use cookies or LocalStorage to check if a user visited your web site before. (update: You should use onReveal
event handler to check if the element is actually revealed and then save it in cookies or LocalStorage) . If you did that and saved it to variable named hasVisited
you could do on of several things:
- set disabled prop to true like so
<Fade disabled={hasVisited} onReveal={ () => {/* set hasVisited to true */} }>
<div>Your Content </div>
</Fade>
The disabled
prop is mostly used internally and is the simplest way but it might have slight side effects.
- Remove reveal elements entirely
{ hasVisited ? <div>Your Content </div> : <Fade onReveal={ () => {/* set hasVisited to true */} }><div>Your Content </div></Fade> }
The last option is the sure way to disable all animations
from react-reveal.
Related Issues (20)
- Requires update to latest version of react
- Pls update React to 17, pls want your from one New Zealand Student HOT 1
- version conflict HOT 1
- I'm Getting This Error While Installing The React-Reveal And I'm Unable To Understand How To Solve It HOT 11
- Update to react 18.0
- This lib deserve a fork to resolve this problems...
- This need to be update to react ^18.2.0 HOT 2
- Causing problems while working with React Router
- Currently working on updating the package HOT 3
- Currently working on updating the package react updated version. HOT 1
- Fade not working on enter
- Integrate with Locomotivescroll
- Installing react-reveal HOT 5
- Scroll reveal animation is firing only once HOT 1
- Can I use react-reveal directionly on astro file
- Add
- Please mention the "disabled" prop on the documentation
- Works with wrong animation
- error An unexpected error occurred: "https://registry.yarnpkg.com/@types%2freact-reveal: Not found
- Update peer dependency to add react ^18.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-reveal.