Director of engineering
@swmansion
. Ex
@reactnative
core at
@facebook
. Author: gesture-handler, reanimated, rn-screens. Available for RN consulting 👋
Yesterday at RNCK I demoed our new React Native IDE project we developed
@swmansion
. Check out the thread for details on each specific feature from the clip
Next version of reanimated will finally have proper stack trace support. Uncaught exceptions from the UI runtime will be presented in React Native's log box along with symbolicated stack trace entries making it easier to find bugs in your worklets.
🚨🚨🚨Excited to announce new major release of Reanimated brought to you by
@swmansion
and
@ShopifyEng
. It features a completely revamped worklet-based API along many other improvements. Read our announcement post to learn more
Turning up reanimated's benchmarks to test the new shared value implementation and it does not even sweat maintaining steady 60fps while the old one drops more than half of the frames. 🤞 this change should land next week
Today we published reanimated
@1
.0.0 – apart from dropping beta label we added new transitions API. It aims to replace RN's LayoutAnimations making them more reliable and customizable. It only took few lines of code to build this demo with transitions API
To prove how powerful gesture-handler could be with reanimated I implemented react-native-interactable component in JS using these two libs. Watch the video below that shows interactable playground running in expo (no extra native modules required) 🍿
Playing more with the upcoming changes to reanimated Transitioning API and still can't believe how easy animating UI transitions can me made thanks to react – you render two states of the UI, tell how new views appear (done button slides in, text fades) and that's it ✨
RN 0.59 has been released yesterday. One of the highlights is 64bit support and new JavaScriptCore provided via jsc-android-buildscripts project that my team
@swmansion
took a part in. I'd like to shed some light on how this change may impact you and your app.
thread 👇
100% this 👇!!! It’s event more applicable to React Native and so common for folks to use svg resources only so that they are automatically transformed to JSX with things like react-native-svg-transformer - don’t do this! If you have svg image, or load svg from url use expo-image
Please don't import SVGs as JSX. It's the most expensive form of sprite sheet: costs a minimum of 3x more than other techniques, and hurts both runtime (rendering) performance and memory usage.
This bundle from a popular site is almost 50% SVG icons (250kb), and most are unused.
Working on native driver support for Animated.tracking. Here is what you'd be able to do with it if you add gesture handler library to the mix, and even when JS thread is completely blocked (note the JS FPS monitor)
🚨🚨React Native IDE announcement: join our beta program, get early access, and help us make the IDE work great for everyone! The form is now open (link in the comment) 👇
At
@swmansion
we often do performance audits of React Native apps. While a lot of people expect performance issues to be rooted in React vs native views integration, to the contrary, in majority of the cases the problems are only on the React side. 🧵
In our IDE you can type using keyboard and the virtual one won't hide. It fixes a very annoying behavior of iOS sim that hides virtual keyboard on first keystroke. As a result, devs think there is lot of space on the screen while for their users big chunk of it is obstructed
On the wave of RN navigation announcements I'm happy to release rn-screens
@2
.0.0-alpha that includes support for native nav stack primitives (e.g., UINavViewController) – you can also use it with RNN – check `createNativeStackNavigator` in the docs 👉
Reanimated 2.3-alpha.2 also ships with a number of performance optimizations. Thanks to the work by
@piaskowyk
and
@Turbo_Szymon
running a multitude of worklets is as smooth as butter 🤩 See this perf comparison for 2.3-alpha.1 (on the left) and alpha.2 (on the right) 👇
New Reanimated alpha release is here with:
- keyframe animations
- remote debugger support
- new set of built-in layout animations
To celebrate the
#Olympics
we made this sweet rings animation with the new keyframe API.
Check full release notes here 👉
Was really overwhelmed by a positive feedback this got after posting it last week. Couldn't check x for a while and my notifications exploded, so I apologize if I missed some of your comments. Should be available now to answer all your questions promptly
Yesterday at RNCK I demoed our new React Native IDE project we developed
@swmansion
. Check out the thread for details on each specific feature from the clip
One of our priorities with IDE project is to make Dev Ex pleasant by default. We setup right defaults for the project to launch *fast*. While there is still room to improve, here is unaltered video showing vscode with extension launching project in under 10sec on 2020 M1 mac
So excited to partner with Shopify on our React Native open source efforts
@swmansion
. They are an amazing company building great products with React Native at a massive scale. With all of that, what they contribute back to the ecosystem will have a huge impact 🔥🔥🔥
Excited to share that React Native is the Future of Mobile at
@Shopify
😎
- Our in production
@reactnative
apps have 95%+ code shared between iOS and Android 🤯
- We're hiring native mobile and web developers
@ShopifyEng
- We're contributing back to OSS👊🏽
Since a lot of people have been asking: IDE is not yet publicly available. We are running beta program with a small group of people, but plan to open invites to everyone willing to help test it next week. Follow
@swmansion
and await announcements
Reanimated 3 on npm is now down to 1.3M from 24M as we no longer publish prebuilt Android binaries. Before, we had to publish 40 different builds of the library (for every CPU architectures, every supported RN version, and separate for Hermes and JSC).
10 years ago with three friends we founded
@swmansion
. Many lines of code later here we are celebrating it with over 180 more friends. It’s an honour to be working with so many talented people. Here’s to the next ten years 🥂
5/ Without doing anything extra, the simulator/emulator session is equipped with an integrated debugger that stops at breakpoints. Uncaught exceptions instead of displaying red box will navigate you to the file and line responsible for an error.
Transferring bytes over the network costs energy, so smaller apps means less energy is waisted when installing or updating. If you have React Native app on the store you can help your planet 🌍 and shave 20MB off its size with a single command, here is how
So it appears that React Native github repo has all the code to run Fabric. With a little bit of hacking I finally got it to work with RNTester app on iOS, AMA 🎉
This is the best Reanimated version to date and one of the biggest releases we made. Congrats to
@piaskowyk
,
@tomekzaw_
,
@graszka22
and the rest of Reanimated team 👏👏👏👏
Good things come to those who wait – today it is the stable V3 release of React Native Reanimated with Shared Element Transitions, DX improvements, perf upgrades, lower memory usage and more... Read our announcement post 👉
On the topic of SwiftUI for those coming from react background and not following swift spec closely – you may be disappointed if you ignored that "some" keyword views declarations use. It essentially prevents components from rendering different views structure for diff states
📣 Just published "Simple physics with Reanimated" – a 3-part tutorial on building simple physics engine in
#ReactNative
with gesture-handler and reanimated libs. Enjoy 👇
New major release of Gesture Handler is here 🚨‼️ We are proud to present Gesture Handler 2.0 with new simplified API, Manual Gesture feature allowing for full control over gesture recognition logic, and more – check out the highlights in our blog post 👉
Haven't posted any RN IDE updates lately. Things got delayed in late Dec/first half of Jan due to health/personal reasons. After that, we discovered a launch-blocking issue we fought with for over two weeks. Today though we had a breakthrough and appears like we know how to fix…
Entry/exit Layout Animations in Reanimated can also be used to animate state changes thanks to React’s key prop – see below how we use it to build an animated
@discord
counter in just a few lines of code and check our tutorial on Layout Animations at
🔥 gesture-handler
@1
.4 is out. And it the the first public release that includes web support by
@Baconbrix
🙌
There are a few other updates including long awaited AndroidX support – note that the new version requires React Native @ 0.60 – more info ⤵️
1/ Our project is a Code extension that can launch RN projects and display iOS/Android emulator side-by-side. The build is “isolated” meaning it spins its own metro/debug session/etc taking away all the tooling complexity you need to learn when starting with React Native.
Today we are publishing react-freeze ❄️ – an experimental library that uses Suspense to prevent portions of React trees from rendering. You can try it now for both React (v17+) and React Native (v0.64+).
🚨 New library alert 🚨 Today we are releasing react-freeze ❄️ – an experimental library that freezes renders for inactive/invisible React component hierarchies. It integrates with
@reactnavigation
but can also be used on web 👉
By far the most complex component I built with react-native-reanimated – a library I open sourced today. It's a 100% declarative implementation of an iOS inspired image preview. Source code is here:
Next version of reanimated will finally have proper stack trace support. Uncaught exceptions from the UI runtime will be presented in React Native's log box along with symbolicated stack trace entries making it easier to find bugs in your worklets.
Thanks to
@graszka22
Reanimated 3 now supports new ways of interpolating colors – also checkout the new page in docs with interactive playground 👀. We changed Reanimated's default in v3 to gamma corrected RGB for all color animations.
8/ Finally, the Editor Follow functionality tries to figure out the screen you want to look at when making changes in your project (based on edition/inspect history). It automatically moves between the screens when you switch between different files in your project.
Did you know react-native-screens brings iOS reachability support to react-navigation based apps? There are just two lines of code you need to add to try it out, see instructions here ➡️
Hi 👋 we just published new alpha of Reanimated 2 with added ability to start animations using withSpring/withTiming directly from JS thread, support typescript in worklets, and a few more improvements (even more to come next week) ⤵️
2/ The example project I’m using is a Airbnb clone by
@schlimmson
(thanks for publishing such a great project!). The app uses
@expo
router and the IDE integrates with it by showing you a URL bar that you can use to jump between screens and navigate back in the history.
🚨 Reanimated 2.3 is out and it is the biggest update since the stable 2.0 release back in March! Congrats to
@piaskowyk
,
@Turbo_Szymon
and many others involved.
The wait is over! Reanimated 2.3 stable is ready for you to install 🥳 Play with fantastic new Layout Animations API and enjoy humongous number of perf and stability improvements.
Full release notes ➡️
Layout Animations tutorial ➡️
Just published react-native-reanimated
@1
.3.0 to address some of the compatibility issues with RN 0.61 – there are more changes to come but hope this one will resolve problems most people were facing after RN upgrade
6/ We developed a new React Native Preview package that allows you to define individual component previews in your code. With a click-to-open link from the editor, the component renders in isolation allowing you to iterate on it without being distracted by the rest of your app.
Shared Values is one of the most fundamental elements introduced in recently released
@reactnative
Reanimated 2, so we encourage you to take a closer look at this concept with
@kzzzf
and his article 👇👇👇
Let us know what you think!
Hey 👋 I published this short article to explain how Reanimated Transitions can be used to replicate LayoutAnimations in react-native. Check it out if you've ever experienced problems with LA (especially on Android)
One of the most exciting changes we are preparing (thanks
@mosdnk
) for the next gesture handler release is that we will start treating secondary and further fingers as separate streams of touches that can activate and drive multiple handlers at the same time. Here is a short demo
Use of Animated API directly in render is a common pattern that in some cases may lead to very slow renders when using native driver or reanimated. Unlike react, Animated does not do any diffing, and on each render just sees new Animated values passed as props
Turning up reanimated's benchmarks to test the new shared value implementation and it does not even sweat maintaining steady 60fps while the old one drops more than half of the frames. 🤞 this change should land next week
Just released gesture-handler
@1
.5.1 that finally fixes "unsupported top event" crash with RN 62. It is still important that you import gesture-handler early in your app as it runs some necessary initialization code which needs to happen before RN's View registration.
Reanimated was the most challenging library our Open Source team ported. Congrats to the team and especially to
@tomekzaw_
and
@piaskowyk
for putting a lot of effort into this release. There is still some work to be done here, but this RC is already looking great
If you are using react-navigation you can try it just by upgrading to react-native-screens 3.9 and enable freeze-mode it with the below code and expect a speedup after pushing a bunch of screens to the stack.
Added color props support to Reanimated today. You can use it to animate from one color to the other. Works when hooked to a gesture too 🎉 The below demo updates hue and saturation as you pan, source:
While 3.7 comes with a lot of cool updates I'm most excited about some perf wins that didn't make the highlights, and the new (used internally for now) API for synchronous cross-runtime worklet execution (executeOnUIRuntimeSync that also improves perf btw)
React Native Reanimated 3.7.0 is out! 🔥
– New 𝚌𝚕𝚊𝚖𝚙 parameter in withSpring 🆕
– Generator support in worklets ☄️
– visionOS support 😎
– Many bug fixes and improvements 🧑💻
Reanimated 2 webinar is happening this Thursday at 7 PM CEST / 10 AM PST. It is free to attend and there is still time to let us know what topics you'd like me to cover. Please comment with ideas and questions on this thread 👇
Even if you're not sure you can make it for the webinar, register anyway! We are sending the webinar recording to everyone who registers! 📹
Also, do you have any questions for
@kzzzf
? You can post it now & we'll answer Thursday! 👇👇👇
Reanimated's animation modifiers allows for creating animation loops, sequences and more. This shaking box runs a sequence of swing animations (swing left, loop from left to right, then back to center)
New reanimated
@1
.1.0 release includes changes made by 14!!!! unique contributors. The changelog is huge and thanks to the community we managed to land so many improvements and fixes 👇
Another thing that I am really excited about in new Reanimated is tighter integration with gesture handler. Forget about gesture states. Check the code snippet to see how easy it is to write interruptible gesture interactions that runs fully on the UI thread.
Reanimated worklets are the backbone of our new architecture. They allow for executing JS on the UI thread pretty seamlessly. No worker bundles, no message passing, just JavaScript
Have you ever noticed that opacity in React Native behaves differently on Android vs iOS? It is because on Android rendering is more efficient when you apply opacity to all views separately and then "multiply blend" these 🤷 However this often yields undesirable effects 👀
Interactive demos are often best ways to explain different concepts. With this one you'll never get lost when writing sophisticated gestures logic with React Native Gesture Handler, or if you just want to understand what events to expect and when.
UNDETERMINED, FAILED, BEGAN, CANCELLED, ACTIVE, or END.
Each gesture in the React Native Gesture Handler is a state machine,
this means a gesture can be in one of these states.
If you've ever had trouble visualizing this, we've created a cool interactive example for you 👇
9 years ago today
@swmansion
was founded.I'm proud of the team's impact over these years on OSS communities both in ReactNative and multimedia space with
@ElixirMembrane
, and of the value this brings to our clients. Here's to the next year of impactful projects and contibutions🥂
Just published gesture-handler 1.0.12. We have something new for both Android and iOS fans – this release includes ripple color setting and brand new force touch handler (courtesy of
@mosdnk
) 🎉 Check full release notes and our "hall of fame" 🏒👇
4/ When you use console from your application’s code, it outputs to the built-in VSCode console. It comes bundled with logs filtering functionality and displays links back to the source code with the log statement.
7/ Device settings are available right in the preview window. You can adjust text size or light/dark mode. This works for both the component previews and for the main application project.
I’ll be hosting a webinar to showcase Reanimated 2 API (there will be some cool examples). Will also discuss architecture and internals of the new version, and will have some time to take questions at the end. Sign up here and see you in three weeks!
Some of you already know from our yesterday's announcement. A LOT OF you actually already signed up! But just to make it official -
#swmAcademy
is organizing another workshop with
@kzzzf
as a host! 🎉🎉🎉
✔️ You can read more and register here:
What you can see below is the new
@reactnative
Screens feature - transition progress! 🤩 We also added full-width swipe and more features that you can read about in the release notes for RN Screens 3.7.0 💙
It's "release Friday" today! Starting off with a fresh 1.1.0 gesture handler release bringing experimental web support, RN touchable polyfills and overflow visible support on Android. Enjoy!
There's been a lot of discussions lately on the sustainability of open source. Wanted to share our new strategy
@swmansion
for open source projects. If you use gesture-handler, reanimated, etc I hope this will make your experience better soon 🙌