-
Notifications
You must be signed in to change notification settings - Fork 185
add react-strict-animated library #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
workflow: benchmarks/perf (native)Comparison of performance test results, measured in operations per second. Larger is better.
|
|
Thanks for bringing the animation library you've made to the OSS project! Want a hand with the build and package parts? |
a998fec to
cd4733c
Compare
So I recreated the build system that's basically exactly like how RSD is built but I'm running into some issues related to the
|
|
I've tried digging into how to resolve the type generation issues but haven't had any luck yet :/ |
|
We can try upgrading the translator package. And if that doesn't work, report the issues to the flow team |
Note: still working on the build/package structure so not quite ready for review yet This introduces a new package to the RSD repo that provides a subset of React Native's API that works on both web and native, and built with integration of react-strict-dom in mind. The native implementation is largely a thin passthrough to the proper Animated API and some settings pre-configured (such as `useAnimatedDriver` always being enabled). The web side is a new Animated implementation that ends up being driven by the Web Animations API.
|
Okay I updated the flow-api-translator which didn't seem to do much but I did find a way to reorganize the exports so that there were no more flow errors after building. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas on how we might have some unit test coverage for the library?
We could also add a couple of e2e examples in the platform-tests app
| let normalizedColor = normalizeColor(input); | ||
|
|
||
| if (normalizedColor != null && typeof normalizedColor === 'object') { | ||
| throw new Error('PlatformColors are not supported'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message probably doesn't make sense in an XPR/RSD/Web context
| ): | ||
| | { components: [number, number, number, number], isColor: true } | ||
| | { components: $ReadOnlyArray<number | string>, isColor: false } { | ||
| let normalizedColor = normalizeColor(input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way we could avoid the need for normalizeColor?
| return ( | ||
| <Animated.View | ||
| {...nativeProps} | ||
| style={[nativeProps.style, animatedStyle]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can animatedStyle be passed to compat.native so it picks up any relevant polyfills?
This introduces a new package to the RSD repo that provides a subset of React Native's API that works on both web and native, and built with integration of react-strict-dom in mind. The native implementation is largely a thin passthrough to the proper Animated API and some settings pre-configured (such as
useAnimatedDriveralways being enabled).The web side is a new Animated implementation that ends up being driven by the Web Animations API.