Title: Animated regular/calculated issue · Issue #504 · rescript-react-native/rescript-react-native · GitHub
Open Graph Title: Animated regular/calculated issue · Issue #504 · rescript-react-native/rescript-react-native
X Title: Animated regular/calculated issue · Issue #504 · rescript-react-native/rescript-react-native
Description: I am currently having an optional interpolation depending on an optional animated value ~transform=[| Transform.translateY( ~translateY= Animated.( animatedFloat( scrollYAnimatedValue ->Option.map(scrollYAnimatedValue => Animated.Value.a...
Open Graph Description: I am currently having an optional interpolation depending on an optional animated value ~transform=[| Transform.translateY( ~translateY= Animated.( animatedFloat( scrollYAnimatedValue ->Option.map(...
X Description: I am currently having an optional interpolation depending on an optional animated value ~transform=[| Transform.translateY( ~translateY= Animated.( animatedFloat( scrollYAnimatedValue ->Option.m...
Opengraph URL: https://github.com/rescript-react-native/rescript-react-native/issues/504
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Animated regular/calculated issue","articleBody":"I am currently having an optional interpolation depending on an optional animated value\r\n\r\n```reason\r\n~transform=[|\r\n Transform.translateY(\r\n ~translateY=\r\n Animated.(\r\n animatedFloat(\r\n scrollYAnimatedValue\r\n -\u003eOption.map(scrollYAnimatedValue =\u003e\r\n Animated.Value.add(\r\n state.animation,\r\n Value.interpolate(\r\n scrollYAnimatedValue,\r\n Interpolation.(\r\n config(\r\n ~inputRange=[|(-200.), 1.|],\r\n ~outputRange=\r\n fromFloatArray([|(-200.), 1.|]),\r\n (),\r\n )\r\n ),\r\n ),\r\n )\r\n )\r\n -\u003eOption.getWithDefault(state.animation),\r\n )\r\n ),\r\n ),\r\n|],\r\n```\r\n\r\nThis code should work but doesn't compile, complaining that `-\u003eOption.getWithDefault(state.animation)` isn't the same type as the interpolation. \r\n\r\n```\r\nError: This expression has type\r\n ReactNative.Animated.value(ReactNative.Animated.regular) =\r\n ReactNative.Animated.value(ReactNative.Animated.regular)\r\n but an expression was expected of type\r\n ReactNative.Animated.value(ReactNative.Animated.calculated) =\r\n ReactNative.Animated.value(ReactNative.Animated.calculated)\r\n Type ReactNative.Animated.regular = ReactNative.Animated.regular\r\n is not compatible with type\r\n ReactNative.Animated.calculated = ReactNative.Animated.calculated\r\n```\r\n\r\nWe should have something to tell that a regular \u0026 calculated are the same at the end, don't we?","author":{"url":"https://github.com/MoOx","@type":"Person","name":"MoOx"},"datePublished":"2019-05-17T08:25:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/504/rescript-react-native/issues/504"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:03c004d5-249d-c162-e9c6-78afe6d96c3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 871C:4F312:1524A2:1A556D:697511E2 |
| html-safe-nonce | 5e413afe46e38a4e9be8e0718ce32c2beba5b9a0a21480b62945ed4385c25dc7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzFDOjRGMzEyOjE1MjRBMjoxQTU1NkQ6Njk3NTExRTIiLCJ2aXNpdG9yX2lkIjoiNTQwMjkxNzkyNjM5NjU2MzkzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 35f0de94390e9a3064125ba9b02a9a9e00cba0cdac4961b4880c17f45c1c3743 |
| hovercard-subject-tag | issue:445323874 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rescript-react-native/rescript-react-native/504/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6f30bde6b5fc328f416608f05c776c9e4e7845d62ee1010bb935232aa7aca670/rescript-react-native/rescript-react-native/issues/504 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6f30bde6b5fc328f416608f05c776c9e4e7845d62ee1010bb935232aa7aca670/rescript-react-native/rescript-react-native/issues/504 |
| og:image:alt | I am currently having an optional interpolation depending on an optional animated value ~transform=[| Transform.translateY( ~translateY= Animated.( animatedFloat( scrollYAnimatedValue ->Option.map(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MoOx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/rescript-react-native/rescript-react-native git https://github.com/rescript-react-native/rescript-react-native.git |
| octolytics-dimension-user_id | 54703302 |
| octolytics-dimension-user_login | rescript-react-native |
| octolytics-dimension-repository_id | 86237257 |
| octolytics-dimension-repository_nwo | rescript-react-native/rescript-react-native |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 86237257 |
| octolytics-dimension-repository_network_root_nwo | rescript-react-native/rescript-react-native |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width