Skip to content

Commit

Permalink
Home.tsx: Perform cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
roshnet committed Jan 10, 2021
1 parent 09ef35c commit dc380dc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function HomeScreen() {
>([])

useEffect(() => {
console.log('onFocus listener added to Home (should be seen once!')
navigation.addListener('focus', updateList)
AsyncStorage.getItem('@intro_shown').then((value) => {
if (!value) navigation.navigate('Intro')
Expand All @@ -26,7 +25,6 @@ export default function HomeScreen() {

useFocusEffect(
React.useCallback(() => {
console.log('onFocusEffect being called -', _update + Math.random())
db.transaction((tx) => {
tx.executeSql(`SELECT * FROM credentials`, [], (t, { rows }) => {
let results: any = rows
Expand All @@ -42,7 +40,6 @@ export default function HomeScreen() {
Children calling it triggers a re-render, which fetches fresh data.
*/
function updateList() {
console.log('Triggering update...')
triggerUpdate(_update + 1)
}

Expand Down

0 comments on commit dc380dc

Please sign in to comment.