React Native Error: ENOSPC: System limit for number of file watchers reached

Linux uses the inotify package to observe filesystem events, individual files or directories. Since React / Angular hot-reloads and recompiles files on save it needs to keep track of all project’s files. Increasing the inotify watch limit should hide the warning messages. You could try editing # insert the new value into the system config … Read more

componentWillMount is deprecated and will be removed in the next major version 0.54.0 in React Native

You should move all the code from the componentWillMount to the constructor or componentDidMount. componentWillMount() is invoked just before mounting occurs. It is called before render(), therefore calling setState() synchronously in this method will not trigger an extra rendering. Generally, we recommend using the constructor() instead. Avoid introducing any side-effects or subscriptions in this method. … Read more

Want to share multiple images with separate caption to each image Whatsapp, react native share

I’ve created working example to share multiple or single images using react-native-share CheckOut ExpoSnack Here added comments before every method what it’ll do and what needs to be replaced. // multiple images share example const shareMultipleImages = async () => { const shareOptions = { title: ‘Share multiple files example’, // here replace base64 data … Read more

FlatList calls `onEndReached` when it’s rendered

Try to implement onMomentumScrollBegin on FlatList : constructor(props) { super(props); this.onEndReachedCalledDuringMomentum = true; } … <FlatList … onEndReached={this.onEndReached.bind(this)} onEndReachedThreshold={0.5} onMomentumScrollBegin={() => { this.onEndReachedCalledDuringMomentum = false; }} /> and modify your onEndReached onEndReached = ({ distanceFromEnd }) => { if(!this.onEndReachedCalledDuringMomentum){ this.fetchData(); this.onEndReachedCalledDuringMomentum = true; } }