mem0-react
A set of styled and ready-to-use React components for mem0.
Includes the User manager component, which allows users to easily view and edit their memories, as well as add new ones. It has everything you need to do CRUD operations on your user's memories with one single component.
Features
- User Manager Component
- Add Memory Component
- Update Memory Component
- Delete Memory Component
Installation
To install dependencies:
npm install mem0-react
To use, in a nextjs app:
import { Mem0MemoryManager } from 'mem0-react';
export default function Home() {
const userId = session.user.id
return (
<Mem0MemoryManager
userId={userId}
// The path should be sent so that we can revalidate the page on changes.
path="/"
/>
);
}
What is the path prop for? It's used to automatically revalidate the page when the user's memories change.