Skip to content

Commit 96f2051

Browse files
authored
Merge pull request #14 from herberthk/modify-docs
docs: modify readme.md
2 parents c960ad1 + 06501d1 commit 96f2051

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import InViewport from '@herberthtk/react-native-viewport';
3636

3737
return (
3838
<InViewport
39-
visiblePercentage={70}
39+
threshold={0.7}
4040
delay={100}
4141
onChange={handleChange}
4242
style={[styles.section, { backgroundColor }]}
@@ -84,7 +84,7 @@ export default App;
8484
| ---------| ------- | ------- | -------- | -------- |
8585
| disabled | boolean | false | If enabled the component will not track visibility status | false |
8686
| delay | number | false | How frequent to check visibility status. Not setting lower less than a second will increase frequency of updates leading performance issues especially in old architecture bridge mode | 1000ms |
87-
| visiblePercentage | number | false | The minimum percentage of the container to be considered visible. By default the container shall be considered visible if 100% of it is visible but you can modify the value to 70, 60, 50 or any other value but it must be less than than 100 | 100 |
87+
| threshold | number | false | Any number that is greater than 0 but less than or equal to 1, 1 means 100% 0.7 means 70% and so on, The value indicate the minimum percentage of the container to be considered visible | 1 |
8888
| onChange | Function | true | This is the core and exposed method that listens and updates visibility status | undefined |
8989

9090
This component also accepts all properties of the `View` component like `style` [Check full list of properties here](https://reactnative.dev/docs/view)

0 commit comments

Comments
 (0)