An open API service indexing awesome lists of open source software.

https://github.com/louaysleman/react-native-spinning-loader


https://github.com/louaysleman/react-native-spinning-loader

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

#react native spinner animation

this project an example of how to make a spinner using `react-native` without using any 3rd party library in the project.

##Live demo:

![Test Image 3](demo/demo.gif)

##Code:
```javascript

const App: () => Node = () => {
const spinValue = new Animated.Value(0);

const spin = () => {
spinValue.setValue(0);
Animated.timing(spinValue, {
toValue: 1,
duration: 1500,
easing: Easing.linear,
useNativeDriver: true,
}).start(() => spin());
};
useEffect(() => {
spin();
}, []);

const rotate = spinValue.interpolate({
inputRange: [0, 1],
outputRange: ['0deg', '360deg'],
});
return (







);
};
```
Hope you like it.