reminded
v1.0.1
Published
Reminded SDK for React Native/Expo
Readme
Reminded SDK
Reminded provides notification infrastructure for mobile apps, functioning as an alternative to services like Resend but focused on push notifications.
Requirements
The SDK is designed for use with React Native and Expo.
react>= 18react-native>= 0.70expo>= 48expo-notifications
You will also need a Reminded Project ID and API Key.
Installation
npm install remindedUsage
1. Setup Provider
Wrap your application root with RemindedProvider to initialize the SDK. This should be done as early as possible in your application lifecycle (e.g., inside app/_layout.tsx) to ensure all events and notifications are captured correctly.
You can optionally pass pathname to track screen views.
// app/_layout.tsx
import { RemindedProvider } from 'reminded';
import { Stack, usePathname } from 'expo-router';
export default function RootLayout() {
const pathname = usePathname();
return (
<RemindedProvider
config={{
apiKey: process.env.EXPO_PUBLIC_REMINDED_API_KEY,
}}
pathname={pathname}
>
<Stack />
</RemindedProvider>
);
}2. Instrument Events & Users
Use the reminded singleton to track events, identify users, and request permissions.
import { Button, View } from 'react-native';
import { reminded } from 'reminded';
export default function HomeScreen() {
const trackEvent = () => {
// Track custom events with properties
reminded.event('game_session_start', { game_name: 'wordle' });
};
const identifyUser = () => {
// Link anonymous session to a specific user
reminded.identify({
external_id: 'user_12345',
email: '[email protected]',
plan: 'premium',
});
};
const requestPermission = async () => {
// Request push notification permissions and auto-register token
const status = await reminded.requestNotificationPermission();
console.log('Permission status:', status);
};
return (
<View>
<Button title="Track Event" onPress={trackEvent} />
<Button title="Identify User" onPress={identifyUser} />
<Button title="Enable Notifications" onPress={requestPermission} />
</View>
);
}Logging Configuration
You can configure the logging verbosity to help with debugging.
import { RemindedProvider, LogLevel } from 'reminded';
<RemindedProvider
config={{
apiKey: '...',
loggerEnabled: true, // Defaults to true
logLevel: LogLevel.DEBUG, // Options: DEBUG, INFO, WARN, ERROR, NONE
}}
>
{/* App Content */}
</RemindedProvider>;- loggerEnabled: Toggle all logging on or off.
- logLevel: Set the minimum level of logs to output.
LogLevel.DEBUGis useful for development to see all events and network requests.
