diff --git a/example/src/App.js b/example/src/App.js index 8dcf528..5f93e01 100644 --- a/example/src/App.js +++ b/example/src/App.js @@ -1,5 +1,5 @@ -import React from 'react' -import { StyleSheet, Text, View } from 'react-native' +import React, { useState } from 'react' +import { StyleSheet, Text, View, Button } from 'react-native' import Steve from 'react-native-steve' const topics = [ @@ -62,6 +62,7 @@ const topics = [ ] export default function App() { + const [data, setData] = useState(topics) const { topicContainer, topicText, @@ -84,19 +85,27 @@ export default function App() { ) } + const handleUpdateDataButtonClick = () => { + setData(topics.filter((_, index) => index < Math.random() * 10).reverse()) + } + return ( {'TOPICS TO EXPLORE'} item.text}/> + +