Posts

Showing posts with the label animation

Using react-spring for react-native

I want to use this library for react-native but couldn't figure out how. The documentation link for react-native is broken. Can i use the library for react-native? React-Spring can be used for react-native. They have updated it for all platform. Try this out:- yarn add react-spring@5.3.0-beta.0 import React from 'react' import { StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native' import { Spring, animated } from 'react-spring/dist/react-spring-native.esm' const styles = { flex: 1, margin: 0, borderRadius: 35, backgroundColor: 'red', alignItems: 'center', justifyContent: 'center', } export default class App extends React.Component { state = { flag: true } toggle = () => this.setState(state => ({ flag: !state.flag })) render() { const { flag } = this.state return ( <Spring native from={{ margin: 0 }} to={{ margin: flag ? 100 : 0...

React Native animations

We need to decide what platform to choose for our iOS & Android applications - React Native or completely native applications (Swift/Java). Generally, React Native is much better for us because we already have React.JS apps. The main concern about React Native is that we need difficult animations. Is it possible to implement with React Native animations of this kind? Dribble #1 Dribble #2 Dribble #3 Dribble #4 If yes - does it works on low-end Android phones? AirBnB introduced Lottie a while back with this very purpose. As for the low-end, it seems to support ICS and up, so... maybe. It's possible to implement something similar to Dribbble #2, #3, #4 with React Native Animations. But for screen transitions in Dribble #1 and good performance on old devices, I would recommend checking a different technology - Flutter.