Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman333 committed Aug 21, 2020
1 parent 4ccc82e commit a776e11
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
9 changes: 7 additions & 2 deletions ExampleProject/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ import {SafeAreaView, Button} from 'react-native';
import AnimatedNumbers from 'react-native-animated-numbers';

const App = () => {
const [animateToNumber, setAnimateToNumber] = React.useState(7979);
const [animateToNumber, setAnimateToNumber] = React.useState(483);

const increase = () => {
setAnimateToNumber(animateToNumber + 1999);
setAnimateToNumber(animateToNumber + 391);
};

const decrease = () => {
setAnimateToNumber(animateToNumber - 311)
}

return (
<SafeAreaView
style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
Expand All @@ -18,6 +22,7 @@ const App = () => {
fontStyle={{fontSize: 50, fontWeight: 'bold'}}
/>
<Button title="increase" onPress={increase} />
<Button title="decrease" onPress={decrease} />
</SafeAreaView>
);
};
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@
Library showing animation of number changes

## install

This package is using [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs/about). So following libs should be installed first

```shell
yarn add react-native-reanimated react-native-gesture-handler && cd ios && pod install
```

next
```shell
yarn add react-native-animated-numbers
# or
npm install react-native-animated-numbers
```

## props
Expand Down Expand Up @@ -59,6 +65,5 @@ export default App;
```

## screenshot
<img src="images/new.gif" />
</br>
<img src="images/new_android.gif" width="270" />
<img src="images/ios.gif" />
<img src="images/android.gif" width="270" />
Binary file added images/android.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ios.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/new.gif
Binary file not shown.
Binary file removed images/new_android.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-animated-numbers",
"version": "0.1.0",
"version": "0.1.1",
"main": "index.js",
"typings": "index.d.ts",
"description": "Module that shows number changes through simple animation",
Expand Down

0 comments on commit a776e11

Please sign in to comment.