Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.setState(previousState => {
return {
messages: GiftedChat.prepend(
previousState.messages,
require('./mock/old_messages.js')
),
loadEarlier: false,
isLoadingEarlier: false
}
})
}
this.setState((previousState) => {
return {
messages: GiftedChat.prepend(previousState.messages, require('./data/old_messages.js')),
loadEarlier: false,
isLoadingEarlier: false,
}
})
}
this.setState((previousState) => {
return {
messages: GiftedChat.prepend(previousState.messages, require('./data/old_messages.js')),
loadEarlier: false,
isLoadingEarlier: false,
};
});
}