New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mem0-react

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem0-react

React components for mem0

latest
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

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:

  • Add the environment variable MEM0_API_KEY to your .env file.

  • Add this in the page you wnat to show user memories:

import { Mem0MemoryManager } from 'mem0-react';

export default function Home() {
  const userId = session.user.id // Here, make sure that this user is authenticated.
  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.

FAQs

Package last updated on 14 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts