sahlhoff / react-native-pulse Goto Github PK
View Code? Open in Web Editor NEWReact Native Pulse Animation
License: MIT License
React Native Pulse Animation
License: MIT License
Hey!
Love the animation - but having a bit of issue adding it. I keep getting the following error whenever I add the const Pulse = require("react-native-pulse")
line.
Any help much appreciated!
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
I'm trying to set a dynamic proprety for eg. diameter with setState.
diameter={this.state.maxDiameter}
The value I get it's correct but the pulse effect not working.
The pulse is square on android instead of a circle. Tested on multiple android devices: S4 and S7 Edge
Would be great if you could specify the duration of the pulse, and a time delay between pulses.
iOS will terminate any backgrounded app whose CPU is > 60% for 10 seconds. Ran into a bug where this component was killing our app when backgrounded. May want to consider rendering null/killing the animation when AppState !== 'active'
pulse.js
must reformatted to use:
I'll submit a PR.
This lib is nice, but it leaves a lot to be wanted in terms of performance since it depends on setInterval and state updates rather than the native side for animations.
This component creates a few setInterval
s. They need to be cleared when the component is unmounted. Otherwise, the intervals will continue to run but the component does not exist so the console will throw errors:
ExceptionsManager.js:78 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Pulse component.
Hi there, is this support to load image from url with below code?
<Pulse color="orange" numPulses={3} diameter={400} speed={20} duration={2000} image={{ source: { uri: "http://www.freeiconspng.com/uploads/calendar-date-event-month-icon--19.png" } }} />
The package generates error because of PropTypes. i checked the code and the is its still importing Proptypes inside react and its already been deprecated since v15.5.
@sahlhoff I really like the module but I'm having a problem with the React setState can only update a mounted or mounting component
warning when changing views thus unmounting a component which uses this module.
Do you have any plans for clearing the callbacks?
The Merge addressing the Proptypes is yet to be published to npm
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.