expo-scheduled-notifications-dev-plugin
v0.1.2
Published
An Expo DevTools plugin to inspect and cancel locally scheduled notifications
Readme
expo-scheduled-notifications-dev-plugin
An Expo DevTools plugin to inspect and cancel your app's locally scheduled notifications from the browser during development.
It reads the pending notifications registered with
expo-notifications
and shows their title, body, trigger (date / interval / daily / weekly /
monthly / yearly / calendar), next fire time, identifier and full raw payload.
You can cancel individual notifications or all of them at once.
This plugin is read-only aside from cancelling — it does not schedule notifications for you.
Installation
npx expo install expo-scheduled-notifications-dev-pluginThis plugin requires expo and expo-notifications (peer dependencies), which
you almost certainly already have if you're scheduling notifications.
Usage
Call the hook once, near the root of your app (for example in App.tsx or your
root layout):
import { useScheduledNotificationsDevTools } from 'expo-scheduled-notifications-dev-plugin';
export default function App() {
useScheduledNotificationsDevTools({
// Optional but recommended: surface any errors from the DevTools bridge.
errorHandler: (error) => console.warn('[scheduled-notifications devtools]', error),
});
// ...rest of your app
}The hook is a no-op in production builds, so it's safe to leave in place.
Opening the plugin
While running your app with npx expo start, press Shift +
m in the terminal to open the DevTools menu, then select
expo-scheduled-notifications-dev-plugin. The plugin UI opens in your
browser and connects to the running app.
License
MIT © Thibault Henry
