Comments (7)
Hi, @ckknight
We wish you not to care about JS files. At the very begging proof of concept of RNR was done only in JS and then implemented in Java and ObjC. So JS code could be described as "dead" as it's not executed at all and will be removed soon I suppose.
We were basing on Animated from RN's core and there "_offset" is done right, but currently we do not support offset at all.
If you wish to implement it or have other idea how to improve RNR, PRs are welcome 😄
from react-native-reanimated.
This is still a legitimate bug that would cause the __getValue
of AnimatedValue
to always return NaN
.
from react-native-reanimated.
Is it a bug?
We do not support using __getValue
because in fact all operations are performed on native side and actually there's no access to node's values from JS (except call
node).
So it's not a good idea to use __getValue
and I suppose this method will be removed soon. It's a relic of this proof of concept I mentioned before
from react-native-reanimated.
(Sorry, I mentioned __getValue
, but it's actually __onEvaluate
called from __getValue
)
If that's the case, then why not explicitly throw
within __onEvaluate
if you definitely don't want people calling it? Seems more prudent than a silent failure of returning NaN
.
from react-native-reanimated.
@ckknight
I suppose than "__" a the beginning of method is quite enough to say not to use it. React Native Reanimated
is a library for performing animations in declarative way and this operation is calling for a method in node's object which is not a good idea.
It's not in documentation (readme) and it's used by us for testing mocks. In stable version it will be removed I suppose.
from react-native-reanimated.
Glad to hear it's going away in the future. I'm just trying to help improve the library and squash any bugs I can find, as I discovered a few when writing TypeScript definitions.
It seems imprudent to leave a method to silently fail by returning NaN
instead of either returning a correct value or throwing.
You're free to do what you want with #54. I'm not going to fight this any further.
from react-native-reanimated.
Thank you for this contribution, but in fact these changes don't fix the problem. If you you wish to check it, run some animation on this node and check its value via some listener (e.g. with setInterval
).
from react-native-reanimated.
Related Issues (20)
- frame drops on reanimated pinch and pan gesture using reanimated on react-native-svg HOT 8
- PhaseScriptExecution fails for Hermes Engine after install of react-native-reanimated HOT 10
- Missing useEvent in mocks HOT 2
- WithDelay of 0ms should not cause any delay HOT 1
- ⭐ [Android] Support 16kb page size for Android 15+ devices HOT 3
- Animation are flickering on IOS when Sentry integration is active HOT 4
- Reanimated Stops Working Completely on iOS HOT 3
- Animation frame drop (flickering animation), reproducible only on real device HOT 2
- Execution failed for task ':react-native-reanimated:buildCMakeDebug[arm64-v8a]'. - Mac M1 HOT 8
- `useAnimatedProps` is not testable
- bug: crashing on Android debug build with RN 0.75 HOT 7
- useAnimatedRef<Animated.FlatList<any>>() always return null v2.8.0 HOT 4
- Android App crash on scrollTo With PanGesture HOT 6
- Fails to build on react-native-macos 0.74.1
- Attempted to use private field on non-instance
- Animations are not working after navigating to the same screen with react-navigation/drawer && react-navigation/bottom-tabs HOT 2
- debuggerWorker.js:69 TypeError: Cannot convert undefined or null to object HOT 7
- [docs] wrong internal link in docs HOT 2
- IllegalViewOperationException associated with ReanimatedUIManage on production crashlytics HOT 1
- useAnimatedKeyboard gives wrong values when prefersCrossFadeTransitions is turned on. 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-native-reanimated.