screens/FeedsScreen.js
import React, {useContext, useState} from 'react'; import {StyleSheet, View} from 'react-native'; import FeedList from '../components/FeedList'; import FloatingWriteButton from '../components/FloatingWriteButton'; import LogContext from '../contexts/LogContext'; function () { const {logs} (LogContext); const [hidden, setHidden] = useState(false); const onScrolledToBottom = (isBottom) => { if (hidden !== isBottom) { setHidden(isBottom); } }; return ( <View style={styles.block}> <FeedList logs={logs} onScrolledToBottom={onScrolledToBottom} /> <FloatingWriteButton /> </View> ); } ( )