Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 16, 2024

Clear messages

Once messages have been synced to your user's device, clearMessages() can be used to clear the synced messages.

src/index.js
import { clearMessages } from 'aws-amplify/in-app-messaging';
await clearMessages();

Note: If your app has authentication implemented, we recommend calling clearMessages() in between user log-ins to remove messages targeted for specific user segments. This is especially important if you anticipate your application will be used in shared device scenarios.